Inheritance: IJsonSerializable
コード例 #1
0
ファイル: OrderChargeback.cs プロジェクト: Riskified/sdk_net
 /// <summary>
 /// Creates a new order chargeback
 /// </summary>
 /// <param name="merchantOrderId">The unique id of the order at the merchant systems</param>
 public OrderChargeback(string merchantOrderId, ChargebackDetails chargebackDetails, FulfillmentDetails fulfillment, DisputeDetails disputeDetails)
     : base(merchantOrderId)
 {
     this.Chargeback = chargebackDetails;
     this.Fulfillment = fulfillment;
     this.Dispute = disputeDetails;
 }
コード例 #2
0
        private static OrderChargeback GenerateOrderChargeback(string orderNum)
        {
            var chargebackDetails = new ChargebackDetails(id: "id1234",
                                charegbackAt: new DateTime(2015, 12, 8, 14, 12, 12, DateTimeKind.Local),
                                chargebackCurrency: "USD",
                                chargebackAmount: (float)50.5,
                                reasonCode: "4863",
                                reasonDesc: "Transaction not recognised",
                                type: "cb",
                                mid: "t_123",
                                creditCardCompany: "visa",
                                respondBy: new DateTime(2016, 9, 1),
                                arn: "a123456789012bc3de45678901f23a45",
                                feeAmount: 20,
                                feeCurrency: "USD",
                                cardIssuer: "Wells Fargo Bank",
                                gateway: "braintree",
                                cardholder: "John Smith",
                                message: "Cardholder disputes quality/ mischaracterization of service/merchandise. Supply detailed refute of these claims, along with any applicable/supporting doc");

            var fulfillmentDetails = new FulfillmentDetails(
                                             fulfillmentId: "123",
                                             createdAt: new DateTime(2015, 12, 8, 14, 12, 12, DateTimeKind.Local),
                                             status: FulfillmentStatusCode.Success,
                                             lineItems: new LineItem[] { new LineItem("Bag", 10.0, 1) },
                                             trackingCompany: "TestCompany");

            var disputeDetails = new DisputeDetails(
                                        disputeType: "first_dispute",
                                        caseId: "a1234",
                                        status: "pending",
                                        issuerPocPhoneNumber: "+1-877-111-1111",
                                        disputedAt:  new DateTime(2016, 9, 15),
                                        expectedResolutionDate: new DateTime(2016, 11, 1));

            return new OrderChargeback(orderNum, chargebackDetails, fulfillmentDetails, disputeDetails);
        }