stripe-ruby-mock 1.8.4.10 → 1.8.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +2 -2
- data/lib/stripe_mock/api/webhooks.rb +1 -0
- data/lib/stripe_mock/data.rb +2 -1
- data/lib/stripe_mock/instance.rb +4 -0
- data/lib/stripe_mock/request_handlers/cards.rb +26 -0
- data/lib/stripe_mock/version.rb +1 -1
- data/lib/stripe_mock/webhook_fixtures/account.updated.json +13 -11
- data/lib/stripe_mock/webhook_fixtures/balance.available.json +25 -0
- data/lib/stripe_mock/webhook_fixtures/charge.dispute.closed.json +12 -11
- data/lib/stripe_mock/webhook_fixtures/charge.dispute.created.json +12 -11
- data/lib/stripe_mock/webhook_fixtures/charge.dispute.updated.json +12 -11
- data/lib/stripe_mock/webhook_fixtures/charge.failed.json +40 -43
- data/lib/stripe_mock/webhook_fixtures/charge.refunded.json +44 -40
- data/lib/stripe_mock/webhook_fixtures/charge.succeeded.json +40 -43
- data/lib/stripe_mock/webhook_fixtures/coupon.created.json +12 -12
- data/lib/stripe_mock/webhook_fixtures/coupon.deleted.json +45 -15
- data/lib/stripe_mock/webhook_fixtures/customer.created.json +44 -32
- data/lib/stripe_mock/webhook_fixtures/customer.discount.created.json +15 -15
- data/lib/stripe_mock/webhook_fixtures/customer.discount.deleted.json +15 -15
- data/lib/stripe_mock/webhook_fixtures/customer.discount.updated.json +22 -22
- data/lib/stripe_mock/webhook_fixtures/customer.subscription.created.json +25 -23
- data/lib/stripe_mock/webhook_fixtures/customer.subscription.deleted.json +25 -23
- data/lib/stripe_mock/webhook_fixtures/customer.subscription.trial_will_end.json +25 -23
- data/lib/stripe_mock/webhook_fixtures/customer.subscription.updated.json +31 -29
- data/lib/stripe_mock/webhook_fixtures/customer.updated.json +44 -32
- data/lib/stripe_mock/webhook_fixtures/invoice.created.json +41 -40
- data/lib/stripe_mock/webhook_fixtures/invoice.payment_failed.json +41 -40
- data/lib/stripe_mock/webhook_fixtures/invoice.payment_succeeded.json +41 -40
- data/lib/stripe_mock/webhook_fixtures/invoice.updated.json +45 -42
- data/lib/stripe_mock/webhook_fixtures/invoiceitem.created.json +13 -13
- data/lib/stripe_mock/webhook_fixtures/invoiceitem.deleted.json +13 -13
- data/lib/stripe_mock/webhook_fixtures/invoiceitem.updated.json +13 -13
- data/lib/stripe_mock/webhook_fixtures/plan.created.json +12 -12
- data/lib/stripe_mock/webhook_fixtures/plan.deleted.json +12 -12
- data/lib/stripe_mock/webhook_fixtures/plan.updated.json +12 -12
- data/lib/stripe_mock/webhook_fixtures/transfer.created.json +80 -15
- data/lib/stripe_mock/webhook_fixtures/transfer.failed.json +80 -15
- data/lib/stripe_mock/webhook_fixtures/transfer.paid.json +80 -15
- data/lib/stripe_mock/webhook_fixtures/transfer.updated.json +80 -15
- data/spec/readme_spec.rb +1 -1
- data/spec/shared_stripe_examples/card_examples.rb +20 -0
- data/spec/shared_stripe_examples/charge_examples.rb +1 -0
- metadata +3 -2
    
        data/README.md
    CHANGED
    
    | @@ -7,7 +7,7 @@ | |
| 7 7 |  | 
| 8 8 | 
             
            In your gemfile:
         | 
| 9 9 |  | 
| 10 | 
            -
                gem 'stripe-ruby-mock', '>= 1.8. | 
| 10 | 
            +
                gem 'stripe-ruby-mock', '>= 1.8.7.0'
         | 
| 11 11 |  | 
| 12 12 | 
             
            ## Features
         | 
| 13 13 |  | 
| @@ -181,7 +181,7 @@ it "mocks a stripe webhook" do | |
| 181 181 |  | 
| 182 182 | 
             
              customer_object = event.data.object
         | 
| 183 183 | 
             
              expect(customer_object.id).to_not be_nil
         | 
| 184 | 
            -
              expect(customer_object. | 
| 184 | 
            +
              expect(customer_object.default_card).to_not be_nil
         | 
| 185 185 | 
             
              # etc.
         | 
| 186 186 | 
             
            end
         | 
| 187 187 | 
             
            ```
         | 
    
        data/lib/stripe_mock/data.rb
    CHANGED
    
    
    
        data/lib/stripe_mock/instance.rb
    CHANGED
    
    
| @@ -4,6 +4,8 @@ module StripeMock | |
| 4 4 |  | 
| 5 5 | 
             
                  def Cards.included(klass)
         | 
| 6 6 | 
             
                    klass.add_handler 'post /v1/customers/(.*)/cards', :create_card
         | 
| 7 | 
            +
                    klass.add_handler 'get /v1/customers/(.*)/cards/(.*)', :retrieve_card
         | 
| 8 | 
            +
                    klass.add_handler 'delete /v1/customers/(.*)/cards/(.*)', :delete_card
         | 
| 7 9 | 
             
                  end
         | 
| 8 10 |  | 
| 9 11 | 
             
                  def create_card(route, method_url, params, headers)
         | 
| @@ -16,6 +18,30 @@ module StripeMock | |
| 16 18 | 
             
                    add_card_to_customer(card, customer)
         | 
| 17 19 | 
             
                  end
         | 
| 18 20 |  | 
| 21 | 
            +
                  def retrieve_card(route, method_url, params, headers)
         | 
| 22 | 
            +
                    route =~ method_url
         | 
| 23 | 
            +
             | 
| 24 | 
            +
                    customer = customers[$1]
         | 
| 25 | 
            +
                    assert_existance :customer, $1, customer
         | 
| 26 | 
            +
                    card = get_customer_card(customer, $2)
         | 
| 27 | 
            +
                    assert_existance :card, $2, card
         | 
| 28 | 
            +
                    card
         | 
| 29 | 
            +
                  end
         | 
| 30 | 
            +
             | 
| 31 | 
            +
                  def delete_card(route, method_url, params, headers)
         | 
| 32 | 
            +
                    route =~ method_url
         | 
| 33 | 
            +
             | 
| 34 | 
            +
                    customer = customers[$1]
         | 
| 35 | 
            +
                    assert_existance :customer, $1, customer
         | 
| 36 | 
            +
                    card = get_customer_card(customer, $2)
         | 
| 37 | 
            +
                    assert_existance :card, $2, card
         | 
| 38 | 
            +
                    card = { id: $2, deleted: true }
         | 
| 39 | 
            +
                    customer[:cards][:data].reject!{|cc| 
         | 
| 40 | 
            +
                      cc[:id] == card[:id]
         | 
| 41 | 
            +
                    }
         | 
| 42 | 
            +
                    card
         | 
| 43 | 
            +
                  end
         | 
| 44 | 
            +
             | 
| 19 45 | 
             
                  private
         | 
| 20 46 |  | 
| 21 47 | 
             
                  def validate_card(card)
         | 
    
        data/lib/stripe_mock/version.rb
    CHANGED
    
    
| @@ -1,24 +1,26 @@ | |
| 1 1 | 
             
            {
         | 
| 2 2 | 
             
              "created": 1326853478,
         | 
| 3 | 
            +
              "livemode": false,
         | 
| 4 | 
            +
              "id": "evt_00000000000000",
         | 
| 5 | 
            +
              "type": "account.updated",
         | 
| 6 | 
            +
              "object": "event",
         | 
| 3 7 | 
             
              "data": {
         | 
| 4 8 | 
             
                "object": {
         | 
| 9 | 
            +
                  "id": "acct_00000000000000",
         | 
| 10 | 
            +
                  "email": "test@stripe.com",
         | 
| 11 | 
            +
                  "statement_descriptor": "TEST",
         | 
| 12 | 
            +
                  "details_submitted": true,
         | 
| 5 13 | 
             
                  "charge_enabled": false,
         | 
| 14 | 
            +
                  "transfer_enabled": false,
         | 
| 6 15 | 
             
                  "currencies_supported": [
         | 
| 7 16 | 
             
                    "USD"
         | 
| 8 17 | 
             
                  ],
         | 
| 9 | 
            -
                  " | 
| 10 | 
            -
                  " | 
| 11 | 
            -
                  " | 
| 12 | 
            -
                  "object": "account",
         | 
| 13 | 
            -
                  "statement_descriptor": "TEST",
         | 
| 14 | 
            -
                  "transfer_enabled": false
         | 
| 18 | 
            +
                  "default_currency": "USD",
         | 
| 19 | 
            +
                  "country": "US",
         | 
| 20 | 
            +
                  "object": "account"
         | 
| 15 21 | 
             
                },
         | 
| 16 22 | 
             
                "previous_attributes": {
         | 
| 17 23 | 
             
                  "details_submitted": false
         | 
| 18 24 | 
             
                }
         | 
| 19 | 
            -
              } | 
| 20 | 
            -
              "id": "evt_00000000000000",
         | 
| 21 | 
            -
              "livemode": false,
         | 
| 22 | 
            -
              "object": "event",
         | 
| 23 | 
            -
              "type": "account.updated"
         | 
| 25 | 
            +
              }
         | 
| 24 26 | 
             
            }
         | 
| @@ -0,0 +1,25 @@ | |
| 1 | 
            +
            {
         | 
| 2 | 
            +
              "created": 1326853478,
         | 
| 3 | 
            +
              "livemode": false,
         | 
| 4 | 
            +
              "id": "evt_00000000000000",
         | 
| 5 | 
            +
              "type": "balance.available",
         | 
| 6 | 
            +
              "object": "event",
         | 
| 7 | 
            +
              "data": {
         | 
| 8 | 
            +
                "object": {
         | 
| 9 | 
            +
                  "pending": [
         | 
| 10 | 
            +
                    {
         | 
| 11 | 
            +
                      "amount": 2217,
         | 
| 12 | 
            +
                      "currency": "usd"
         | 
| 13 | 
            +
                    }
         | 
| 14 | 
            +
                  ],
         | 
| 15 | 
            +
                  "available": [
         | 
| 16 | 
            +
                    {
         | 
| 17 | 
            +
                      "amount": 0,
         | 
| 18 | 
            +
                      "currency": "usd"
         | 
| 19 | 
            +
                    }
         | 
| 20 | 
            +
                  ],
         | 
| 21 | 
            +
                  "livemode": false,
         | 
| 22 | 
            +
                  "object": "balance"
         | 
| 23 | 
            +
                }
         | 
| 24 | 
            +
              }
         | 
| 25 | 
            +
            }
         | 
| @@ -1,21 +1,22 @@ | |
| 1 1 | 
             
            {
         | 
| 2 2 | 
             
              "created": 1326853478,
         | 
| 3 | 
            +
              "livemode": false,
         | 
| 4 | 
            +
              "id": "evt_00000000000000",
         | 
| 5 | 
            +
              "type": "charge.dispute.closed",
         | 
| 6 | 
            +
              "object": "event",
         | 
| 3 7 | 
             
              "data": {
         | 
| 4 8 | 
             
                "object": {
         | 
| 5 | 
            -
                  "amount": 1000,
         | 
| 6 9 | 
             
                  "charge": "ch_00000000000000",
         | 
| 7 | 
            -
                  " | 
| 8 | 
            -
                  " | 
| 9 | 
            -
                  " | 
| 10 | 
            -
                  "evidence_due_by": 1373155199,
         | 
| 10 | 
            +
                  "amount": 1000,
         | 
| 11 | 
            +
                  "created": 1381080229,
         | 
| 12 | 
            +
                  "status": "won",
         | 
| 11 13 | 
             
                  "livemode": false,
         | 
| 14 | 
            +
                  "currency": "usd",
         | 
| 12 15 | 
             
                  "object": "dispute",
         | 
| 13 16 | 
             
                  "reason": "general",
         | 
| 14 | 
            -
                  " | 
| 17 | 
            +
                  "balance_transaction": "txn_00000000000000",
         | 
| 18 | 
            +
                  "evidence_due_by": 1382745599,
         | 
| 19 | 
            +
                  "evidence": "Here is some evidence"
         | 
| 15 20 | 
             
                }
         | 
| 16 | 
            -
              } | 
| 17 | 
            -
              "id": "evt_00000000000000",
         | 
| 18 | 
            -
              "livemode": false,
         | 
| 19 | 
            -
              "object": "event",
         | 
| 20 | 
            -
              "type": "charge.dispute.closed"
         | 
| 21 | 
            +
              }
         | 
| 21 22 | 
             
            }
         | 
| @@ -1,21 +1,22 @@ | |
| 1 1 | 
             
            {
         | 
| 2 2 | 
             
              "created": 1326853478,
         | 
| 3 | 
            +
              "livemode": false,
         | 
| 4 | 
            +
              "id": "evt_00000000000000",
         | 
| 5 | 
            +
              "type": "charge.dispute.created",
         | 
| 6 | 
            +
              "object": "event",
         | 
| 3 7 | 
             
              "data": {
         | 
| 4 8 | 
             
                "object": {
         | 
| 5 | 
            -
                  "amount": 1000,
         | 
| 6 9 | 
             
                  "charge": "ch_00000000000000",
         | 
| 7 | 
            -
                  " | 
| 8 | 
            -
                  " | 
| 9 | 
            -
                  " | 
| 10 | 
            -
                  "evidence_due_by": 1373155199,
         | 
| 10 | 
            +
                  "amount": 1000,
         | 
| 11 | 
            +
                  "created": 1381080223,
         | 
| 12 | 
            +
                  "status": "needs_response",
         | 
| 11 13 | 
             
                  "livemode": false,
         | 
| 14 | 
            +
                  "currency": "usd",
         | 
| 12 15 | 
             
                  "object": "dispute",
         | 
| 13 16 | 
             
                  "reason": "general",
         | 
| 14 | 
            -
                  " | 
| 17 | 
            +
                  "balance_transaction": "txn_00000000000000",
         | 
| 18 | 
            +
                  "evidence_due_by": 1382745599,
         | 
| 19 | 
            +
                  "evidence": null
         | 
| 15 20 | 
             
                }
         | 
| 16 | 
            -
              } | 
| 17 | 
            -
              "id": "evt_00000000000000",
         | 
| 18 | 
            -
              "livemode": false,
         | 
| 19 | 
            -
              "object": "event",
         | 
| 20 | 
            -
              "type": "charge.dispute.created"
         | 
| 21 | 
            +
              }
         | 
| 21 22 | 
             
            }
         | 
| @@ -1,24 +1,25 @@ | |
| 1 1 | 
             
            {
         | 
| 2 2 | 
             
              "created": 1326853478,
         | 
| 3 | 
            +
              "livemode": false,
         | 
| 4 | 
            +
              "id": "evt_00000000000000",
         | 
| 5 | 
            +
              "type": "charge.dispute.updated",
         | 
| 6 | 
            +
              "object": "event",
         | 
| 3 7 | 
             
              "data": {
         | 
| 4 8 | 
             
                "object": {
         | 
| 5 | 
            -
                  "amount": 1000,
         | 
| 6 9 | 
             
                  "charge": "ch_00000000000000",
         | 
| 7 | 
            -
                  " | 
| 8 | 
            -
                  " | 
| 9 | 
            -
                  " | 
| 10 | 
            -
                  "evidence_due_by": 1373155199,
         | 
| 10 | 
            +
                  "amount": 1000,
         | 
| 11 | 
            +
                  "created": 1381080226,
         | 
| 12 | 
            +
                  "status": "under_review",
         | 
| 11 13 | 
             
                  "livemode": false,
         | 
| 14 | 
            +
                  "currency": "usd",
         | 
| 12 15 | 
             
                  "object": "dispute",
         | 
| 13 16 | 
             
                  "reason": "general",
         | 
| 14 | 
            -
                  " | 
| 17 | 
            +
                  "balance_transaction": "txn_00000000000000",
         | 
| 18 | 
            +
                  "evidence_due_by": 1382745599,
         | 
| 19 | 
            +
                  "evidence": "Here is some evidence"
         | 
| 15 20 | 
             
                },
         | 
| 16 21 | 
             
                "previous_attributes": {
         | 
| 17 22 | 
             
                  "evidence": null
         | 
| 18 23 | 
             
                }
         | 
| 19 | 
            -
              } | 
| 20 | 
            -
              "id": "evt_00000000000000",
         | 
| 21 | 
            -
              "livemode": false,
         | 
| 22 | 
            -
              "object": "event",
         | 
| 23 | 
            -
              "type": "charge.dispute.updated"
         | 
| 24 | 
            +
              }
         | 
| 24 25 | 
             
            }
         | 
| @@ -1,57 +1,54 @@ | |
| 1 1 | 
             
            {
         | 
| 2 2 | 
             
              "created": 1326853478,
         | 
| 3 | 
            +
              "livemode": false,
         | 
| 4 | 
            +
              "id": "evt_00000000000000",
         | 
| 5 | 
            +
              "type": "charge.failed",
         | 
| 6 | 
            +
              "object": "event",
         | 
| 3 7 | 
             
              "data": {
         | 
| 4 8 | 
             
                "object": {
         | 
| 5 | 
            -
                  " | 
| 6 | 
            -
                  " | 
| 7 | 
            -
                  " | 
| 9 | 
            +
                  "id": "ch_00000000000000",
         | 
| 10 | 
            +
                  "object": "charge",
         | 
| 11 | 
            +
                  "created": 1380933505,
         | 
| 12 | 
            +
                  "livemode": false,
         | 
| 13 | 
            +
                  "paid": false,
         | 
| 14 | 
            +
                  "amount": 1000,
         | 
| 15 | 
            +
                  "currency": "usd",
         | 
| 16 | 
            +
                  "refunded": false,
         | 
| 8 17 | 
             
                  "card": {
         | 
| 9 | 
            -
                    " | 
| 10 | 
            -
                    " | 
| 18 | 
            +
                    "id": "cc_00000000000000",
         | 
| 19 | 
            +
                    "object": "card",
         | 
| 20 | 
            +
                    "last4": "4242",
         | 
| 21 | 
            +
                    "type": "Visa",
         | 
| 22 | 
            +
                    "exp_month": 12,
         | 
| 23 | 
            +
                    "exp_year": 2013,
         | 
| 24 | 
            +
                    "fingerprint": "wXWJT135mEK107G8",
         | 
| 25 | 
            +
                    "customer": "cus_00000000000000",
         | 
| 26 | 
            +
                    "country": "US",
         | 
| 27 | 
            +
                    "name": "Actual Nothing",
         | 
| 11 28 | 
             
                    "address_line1": null,
         | 
| 12 | 
            -
                    "address_line1_check": null,
         | 
| 13 29 | 
             
                    "address_line2": null,
         | 
| 30 | 
            +
                    "address_city": null,
         | 
| 14 31 | 
             
                    "address_state": null,
         | 
| 15 32 | 
             
                    "address_zip": null,
         | 
| 16 | 
            -
                    " | 
| 17 | 
            -
                    "country": "US",
         | 
| 33 | 
            +
                    "address_country": null,
         | 
| 18 34 | 
             
                    "cvc_check": null,
         | 
| 19 | 
            -
                    " | 
| 20 | 
            -
                    " | 
| 21 | 
            -
                    "fingerprint": "wXWJT135mEK107G8",
         | 
| 22 | 
            -
                    "last4": "4242",
         | 
| 23 | 
            -
                    "name": "Johnny Appleseed",
         | 
| 24 | 
            -
                    "object": "card",
         | 
| 25 | 
            -
                    "type": "Visa"
         | 
| 35 | 
            +
                    "address_line1_check": null,
         | 
| 36 | 
            +
                    "address_zip_check": null
         | 
| 26 37 | 
             
                  },
         | 
| 27 | 
            -
                  " | 
| 28 | 
            -
                  " | 
| 29 | 
            -
             | 
| 30 | 
            -
                  "description": "Customer: Johnny Appleseed Email: japp@mailinator.com Product: A Box of Happiness ID: 36 Quantity: 3 ",
         | 
| 31 | 
            -
                  "dispute": null,
         | 
| 32 | 
            -
                  "failure_code": null,
         | 
| 33 | 
            -
                  "failure_message": null,
         | 
| 34 | 
            -
                  "fee": 451,
         | 
| 35 | 
            -
                  "fee_details": [
         | 
| 36 | 
            -
                    {
         | 
| 37 | 
            -
                      "amount": 451,
         | 
| 38 | 
            -
                      "amount_refunded": 0,
         | 
| 39 | 
            -
                      "application": null,
         | 
| 40 | 
            -
                      "currency": "usd",
         | 
| 41 | 
            -
                      "description": "Stripe processing fees",
         | 
| 42 | 
            -
                      "type": "stripe_fee"
         | 
| 43 | 
            -
                    }
         | 
| 38 | 
            +
                  "captured": true,
         | 
| 39 | 
            +
                  "refunds": [
         | 
| 40 | 
            +
             | 
| 44 41 | 
             
                  ],
         | 
| 45 | 
            -
                  " | 
| 46 | 
            -
                  " | 
| 47 | 
            -
                  " | 
| 48 | 
            -
                  " | 
| 49 | 
            -
                  " | 
| 50 | 
            -
                  " | 
| 42 | 
            +
                  "balance_transaction": "txn_00000000000000",
         | 
| 43 | 
            +
                  "failure_message": null,
         | 
| 44 | 
            +
                  "failure_code": null,
         | 
| 45 | 
            +
                  "amount_refunded": 0,
         | 
| 46 | 
            +
                  "customer": "cus_00000000000000",
         | 
| 47 | 
            +
                  "invoice": "in_00000000000000",
         | 
| 48 | 
            +
                  "description": null,
         | 
| 49 | 
            +
                  "dispute": null,
         | 
| 50 | 
            +
                  "metadata": {
         | 
| 51 | 
            +
                  }
         | 
| 51 52 | 
             
                }
         | 
| 52 | 
            -
              } | 
| 53 | 
            -
              "id": "evt_00000000000000",
         | 
| 54 | 
            -
              "livemode": false,
         | 
| 55 | 
            -
              "object": "event",
         | 
| 56 | 
            -
              "type": "charge.failed"
         | 
| 53 | 
            +
              }
         | 
| 57 54 | 
             
            }
         | 
| @@ -1,57 +1,61 @@ | |
| 1 1 | 
             
            {
         | 
| 2 2 | 
             
              "created": 1326853478,
         | 
| 3 | 
            +
              "livemode": false,
         | 
| 4 | 
            +
              "id": "evt_00000000000000",
         | 
| 5 | 
            +
              "type": "charge.refunded",
         | 
| 6 | 
            +
              "object": "event",
         | 
| 3 7 | 
             
              "data": {
         | 
| 4 8 | 
             
                "object": {
         | 
| 5 | 
            -
                  " | 
| 6 | 
            -
                  " | 
| 7 | 
            -
                  " | 
| 9 | 
            +
                  "id": "ch_00000000000000",
         | 
| 10 | 
            +
                  "object": "charge",
         | 
| 11 | 
            +
                  "created": 1380933505,
         | 
| 12 | 
            +
                  "livemode": false,
         | 
| 13 | 
            +
                  "paid": true,
         | 
| 14 | 
            +
                  "amount": 1000,
         | 
| 15 | 
            +
                  "currency": "usd",
         | 
| 16 | 
            +
                  "refunded": true,
         | 
| 8 17 | 
             
                  "card": {
         | 
| 9 | 
            -
                    " | 
| 10 | 
            -
                    " | 
| 18 | 
            +
                    "id": "cc_00000000000000",
         | 
| 19 | 
            +
                    "object": "card",
         | 
| 20 | 
            +
                    "last4": "4242",
         | 
| 21 | 
            +
                    "type": "Visa",
         | 
| 22 | 
            +
                    "exp_month": 12,
         | 
| 23 | 
            +
                    "exp_year": 2013,
         | 
| 24 | 
            +
                    "fingerprint": "wXWJT135mEK107G8",
         | 
| 25 | 
            +
                    "customer": "cus_00000000000000",
         | 
| 26 | 
            +
                    "country": "US",
         | 
| 27 | 
            +
                    "name": "Actual Nothing",
         | 
| 11 28 | 
             
                    "address_line1": null,
         | 
| 12 | 
            -
                    "address_line1_check": null,
         | 
| 13 29 | 
             
                    "address_line2": null,
         | 
| 30 | 
            +
                    "address_city": null,
         | 
| 14 31 | 
             
                    "address_state": null,
         | 
| 15 32 | 
             
                    "address_zip": null,
         | 
| 16 | 
            -
                    " | 
| 17 | 
            -
                    "country": "US",
         | 
| 33 | 
            +
                    "address_country": null,
         | 
| 18 34 | 
             
                    "cvc_check": null,
         | 
| 19 | 
            -
                    " | 
| 20 | 
            -
                    " | 
| 21 | 
            -
                    "fingerprint": "wXWJT135mEK107G8",
         | 
| 22 | 
            -
                    "last4": "4242",
         | 
| 23 | 
            -
                    "name": "Johnny Appleseed",
         | 
| 24 | 
            -
                    "object": "card",
         | 
| 25 | 
            -
                    "type": "Visa"
         | 
| 35 | 
            +
                    "address_line1_check": null,
         | 
| 36 | 
            +
                    "address_zip_check": null
         | 
| 26 37 | 
             
                  },
         | 
| 27 | 
            -
                  " | 
| 28 | 
            -
                  " | 
| 29 | 
            -
                  "customer": null,
         | 
| 30 | 
            -
                  "description": "Customer: Johnny Appleseed Email: japp@mailinator.com Product: A Box of Happiness ID: 36 Quantity: 3 ",
         | 
| 31 | 
            -
                  "dispute": null,
         | 
| 32 | 
            -
                  "failure_code": null,
         | 
| 33 | 
            -
                  "failure_message": null,
         | 
| 34 | 
            -
                  "fee": 0,
         | 
| 35 | 
            -
                  "fee_details": [
         | 
| 38 | 
            +
                  "captured": true,
         | 
| 39 | 
            +
                  "refunds": [
         | 
| 36 40 | 
             
                    {
         | 
| 37 | 
            -
                      "amount":  | 
| 38 | 
            -
                      "amount_refunded": 0,
         | 
| 39 | 
            -
                      "application": null,
         | 
| 41 | 
            +
                      "amount": 1000,
         | 
| 40 42 | 
             
                      "currency": "usd",
         | 
| 41 | 
            -
                      " | 
| 42 | 
            -
                      " | 
| 43 | 
            +
                      "created": 1381080103,
         | 
| 44 | 
            +
                      "object": "refund",
         | 
| 45 | 
            +
                      "balance_transaction": "txn_2hkjgg43ucu7K1"
         | 
| 43 46 | 
             
                    }
         | 
| 44 47 | 
             
                  ],
         | 
| 45 | 
            -
                  " | 
| 46 | 
            -
                  " | 
| 47 | 
            -
                  " | 
| 48 | 
            -
                  " | 
| 49 | 
            -
                  " | 
| 50 | 
            -
                  " | 
| 48 | 
            +
                  "balance_transaction": "txn_00000000000000",
         | 
| 49 | 
            +
                  "failure_message": null,
         | 
| 50 | 
            +
                  "failure_code": null,
         | 
| 51 | 
            +
                  "amount_refunded": 1000,
         | 
| 52 | 
            +
                  "customer": "cus_00000000000000",
         | 
| 53 | 
            +
                  "invoice": "in_00000000000000",
         | 
| 54 | 
            +
                  "description": null,
         | 
| 55 | 
            +
                  "dispute": null,
         | 
| 56 | 
            +
                  "metadata": {
         | 
| 57 | 
            +
                  },
         | 
| 58 | 
            +
                  "fee": 0
         | 
| 51 59 | 
             
                }
         | 
| 52 | 
            -
              } | 
| 53 | 
            -
              "id": "evt_00000000000000",
         | 
| 54 | 
            -
              "livemode": false,
         | 
| 55 | 
            -
              "object": "event",
         | 
| 56 | 
            -
              "type": "charge.refunded"
         | 
| 60 | 
            +
              }
         | 
| 57 61 | 
             
            }
         |