stripe_model_callbacks 0.1.1 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +22 -1
- data/app/models/stripe_model_callbacks/application_record.rb +17 -0
- data/app/services/stripe_model_callbacks/account/external_account/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/attributes_assigner_service.rb +1 -1
- data/app/services/stripe_model_callbacks/base_service.rb +37 -4
- data/app/services/stripe_model_callbacks/charge/dispute_updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/charge/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/configure_service.rb +52 -24
- data/app/services/stripe_model_callbacks/coupon/sync_all.rb +9 -0
- data/app/services/stripe_model_callbacks/coupon/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/customer/bank_account/deleted_service.rb +1 -1
- data/app/services/stripe_model_callbacks/customer/deleted_service.rb +1 -1
- data/app/services/stripe_model_callbacks/customer/discount_updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/customer/source_updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/customer/subscription/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/customer/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/event_mocker_service.rb +1 -1
- data/app/services/stripe_model_callbacks/invoice/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/invoice_item/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/notifier_service.rb +1 -1
- data/app/services/stripe_model_callbacks/order/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/payout/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/plan/sync_all.rb +9 -0
- data/app/services/stripe_model_callbacks/plan/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/price/updated_service.rb +14 -0
- data/app/services/stripe_model_callbacks/product/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/recipient/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/refund/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/review/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/sku/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/source/updated_service.rb +1 -1
- data/app/services/stripe_model_callbacks/subscription/state_checker_service.rb +2 -2
- data/app/services/stripe_model_callbacks/subscription_schedule/updated_service.rb +46 -0
- data/app/services/stripe_model_callbacks/sync_everything.rb +8 -0
- data/app/services/stripe_model_callbacks/sync_from_stripe.rb +29 -0
- data/app/services/stripe_model_callbacks/tax_rate/updated_service.rb +27 -0
- data/app/services/stripe_model_callbacks/transfer/updated_service.rb +1 -1
- data/config/routes.rb +1 -1
- data/db/migrate/20180206151132_change_activities_trackable_id_to_string.rb +1 -1
- data/db/migrate/20180208091647_change_stripe_subscription_items_quantity_to_integer.rb +1 -1
- data/db/migrate/20200317160513_add_auto_advance_and_billing_reason_to_stripe_invoices.rb +6 -0
- data/db/migrate/20200317160602_add_status_and_status_transitions_to_stripe_invoices.rb +10 -0
- data/db/migrate/20200317180115_add_product_type_to_products.rb +5 -0
- data/db/migrate/20200317181224_rename_stripe_invoices_application_fee_to_application_fee_amount.rb +6 -0
- data/db/migrate/20200320105158_make_stripe_invoices_forgive_optional.rb +5 -0
- data/db/migrate/20200320114859_make_stripe_invoice_closed_optional.rb +5 -0
- data/db/migrate/20200323143634_add_amount_paid_and_remaining_and_invoice_url_and_pdf.rb +11 -0
- data/db/migrate/20200331074940_add_unit_label_to_stripe_products.rb +5 -0
- data/db/migrate/20200331075241_add_metered_info_to_stripe_plans.rb +9 -0
- data/db/migrate/20200513131105_create_stripe_subscription_schedules.rb +31 -0
- data/db/migrate/20200513131120_create_stripe_subscription_schedule_phases.rb +21 -0
- data/db/migrate/20200513131640_create_stripe_subscription_schedule_phase_plans.rb +13 -0
- data/db/migrate/20200514132247_add_stripe_id_uniq_to_stripe_invoices.rb +8 -0
- data/db/migrate/20200520152604_change_stripe_subscription_schedule_phase_id_to_bigint.rb +27 -0
- data/db/migrate/20200529144649_add_latest_invoice_id_to_stripe_subscription.rb +5 -0
- data/db/migrate/20201223173035_rename_stripe_subscriptions_start_to_start_date.rb +5 -0
- data/db/migrate/20201223202117_create_stripe_tax_rates.rb +15 -0
- data/db/migrate/20201224120534_create_stripe_subscription_default_tax_rates.rb +9 -0
- data/db/migrate/20201224122058_create_stripe_prices.rb +26 -0
- data/db/migrate/20201224123838_add_stripe_price_to_stripe_subscription_items.rb +6 -0
- data/db/migrate/20211121155313_change_invoice_billing_to_nullable.rb +5 -0
- data/db/migrate/20211121155732_rename_invoices_billing_to_deprecated_billing.rb +5 -0
- data/lib/stripe_model_callbacks/configuration.rb +1 -1
- data/lib/stripe_model_callbacks/factories/stripe_coupons.rb +16 -0
- data/lib/stripe_model_callbacks/factories/stripe_invoices.rb +1 -1
- data/lib/stripe_model_callbacks/factories/stripe_plans.rb +3 -1
- data/lib/stripe_model_callbacks/factories/stripe_prices.rb +3 -0
- data/lib/stripe_model_callbacks/factories/stripe_products.rb +13 -0
- data/lib/stripe_model_callbacks/factories/stripe_subscription_default_tax_rates.rb +6 -0
- data/lib/stripe_model_callbacks/factories/stripe_subscription_schedule.rb.rb +5 -0
- data/lib/stripe_model_callbacks/factories/stripe_subscription_schedule_phase_plan.rb +5 -0
- data/lib/stripe_model_callbacks/factories/stripe_subscription_schedule_phases.rb +5 -0
- data/lib/stripe_model_callbacks/factories/stripe_subscriptions.rb +1 -1
- data/lib/stripe_model_callbacks/factories/stripe_tax_rates.rb +5 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/account/account.external_account.created.json +29 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/account/account.external_account.deleted.json +29 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/account/account.external_account.updated.json +31 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.dispute.closed.json +65 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.dispute.created.json +65 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.dispute.funds_reinstated.json +65 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.dispute.funds_withdrawn.json +65 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.dispute.updated.json +96 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.refund.updated.json +28 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.refunded.json +98 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/coupon/coupon.created.json +29 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/coupon/coupon.deleted.json +29 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/coupon/coupon.updated.json +31 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.bank_account.deleted.json +29 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.created.json +36 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.deleted.json +47 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.discount.created.json +36 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.discount.deleted.json +36 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.discount.updated.json +55 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.source.created.card.json +80 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.source.created.json +53 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.source.deleted.json +53 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.source.expiring.json +53 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.source.updated.json +56 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.subscription.created.2020-12-24.json +112 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.subscription.created.json +84 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.subscription.deleted.json +83 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.subscription.trial_will_end.json +88 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.subscription.updated.json +100 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.updated.json +50 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.created.json +135 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.payment_failed.json +100 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.payment_succeeded.json +207 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.sent.json +100 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.upcoming.json +100 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.updated.json +105 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/invoice/invoice.voided.json +152 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/invoiceitem/invoiceitem.created.json +34 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/order/order.created.json +72 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/order/order.updated.json +74 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/payout/payout.canceled.json +35 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/payout/payout.created.json +35 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/payout/payout.failed.json +35 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/payout/payout.paid.json +35 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/payout/payout.updated.json +37 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/plan/plan.created.json +32 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/plan/plan.deleted.json +27 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/plan/plan.updated.json +30 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/price/price.created.json +37 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/price/price.deleted.json +37 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/price/price.updated.json +40 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/product/product.created.json +49 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/product/product.deleted.json +48 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/product/product.updated.json +50 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/recipient/recipient.created.json +37 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/recipient/recipient.deleted.json +37 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/recipient/recipient.updated.json +39 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/review/review.closed.json +21 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/review/review.opened.json +21 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/sku/sku.created.json +36 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/sku/sku.deleted.json +36 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/sku/sku.updated.json +38 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/source/source.canceled.json +53 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/source/source.chargeable.json +53 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/source/source.failed.json +53 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/source/source.mandate_notification.json +53 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/source/source.transaction_created.json +21 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/subscription_schedule/subscription_schedule.canceled.json +81 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/subscription_schedule/subscription_schedule.created.json +77 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/subscription_schedule/subscription_schedule.updated.json +87 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/tax_rate/tax_rate.created.json +26 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/tax_rate/tax_rate.updated.json +29 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/transfer/transfer.created.json +41 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/transfer/transfer.reversed.json +40 -0
- data/lib/stripe_model_callbacks/fixtures/stripe_events/transfer/transfer.updated.json +44 -0
- data/lib/stripe_model_callbacks/models/stripe_bank_account.rb +1 -0
- data/lib/stripe_model_callbacks/models/stripe_card.rb +2 -1
- data/lib/stripe_model_callbacks/models/stripe_charge.rb +3 -0
- data/lib/stripe_model_callbacks/models/stripe_coupon.rb +1 -0
- data/lib/stripe_model_callbacks/models/stripe_customer.rb +4 -2
- data/lib/stripe_model_callbacks/models/stripe_discount.rb +10 -3
- data/lib/stripe_model_callbacks/models/stripe_dispute.rb +1 -0
- data/lib/stripe_model_callbacks/models/stripe_invoice.rb +62 -7
- data/lib/stripe_model_callbacks/models/stripe_invoice_item.rb +2 -0
- data/lib/stripe_model_callbacks/models/stripe_order.rb +1 -0
- data/lib/stripe_model_callbacks/models/stripe_order_item.rb +1 -0
- data/lib/stripe_model_callbacks/models/stripe_payout.rb +2 -1
- data/lib/stripe_model_callbacks/models/stripe_plan.rb +4 -1
- data/lib/stripe_model_callbacks/models/stripe_price.rb +27 -0
- data/lib/stripe_model_callbacks/models/stripe_product.rb +17 -7
- data/lib/stripe_model_callbacks/models/stripe_recipient.rb +1 -0
- data/lib/stripe_model_callbacks/models/stripe_refund.rb +1 -0
- data/lib/stripe_model_callbacks/models/stripe_review.rb +1 -0
- data/lib/stripe_model_callbacks/models/stripe_sku.rb +13 -6
- data/lib/stripe_model_callbacks/models/stripe_source.rb +4 -2
- data/lib/stripe_model_callbacks/models/stripe_subscription.rb +56 -6
- data/lib/stripe_model_callbacks/models/stripe_subscription_default_tax_rate.rb +4 -0
- data/lib/stripe_model_callbacks/models/stripe_subscription_item.rb +19 -1
- data/lib/stripe_model_callbacks/models/stripe_subscription_schedule.rb +94 -0
- data/lib/stripe_model_callbacks/models/stripe_subscription_schedule_phase.rb +67 -0
- data/lib/stripe_model_callbacks/models/stripe_subscription_schedule_phase_plan.rb +37 -0
- data/lib/stripe_model_callbacks/models/stripe_tax_rate.rb +22 -0
- data/lib/stripe_model_callbacks/models/stripe_transfer.rb +1 -0
- data/lib/stripe_model_callbacks/version.rb +1 -1
- data/lib/stripe_model_callbacks.rb +1 -0
- metadata +176 -24
- data/app/assets/config/stripe_model_callbacks_manifest.js +0 -2
- data/app/assets/javascripts/stripe_model_callbacks/application.js +0 -13
- data/app/assets/stylesheets/stripe_model_callbacks/application.css +0 -15
- data/app/controllers/stripe_model_callbacks/application_controller.rb +0 -3
- data/app/jobs/stripe_model_callbacks/application_job.rb +0 -2
- data/app/mailers/stripe_model_callbacks/application_mailer.rb +0 -4
- data/app/views/layouts/stripe_model_callbacks/application.html.erb +0 -14
@@ -0,0 +1,65 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"livemode": false,
|
4
|
+
"id": "evt_00000000000000",
|
5
|
+
"type": "charge.dispute.closed",
|
6
|
+
"object": "event",
|
7
|
+
"request": null,
|
8
|
+
"pending_webhooks": 1,
|
9
|
+
"api_version": "2018-01-23",
|
10
|
+
"data": {
|
11
|
+
"object": {
|
12
|
+
"id": "dp_00000000000000",
|
13
|
+
"object": "dispute",
|
14
|
+
"amount": 1000,
|
15
|
+
"balance_transaction": "txn_00000000000000",
|
16
|
+
"balance_transactions": [
|
17
|
+
|
18
|
+
],
|
19
|
+
"charge": "ch_00000000000000",
|
20
|
+
"created": 1517922714,
|
21
|
+
"currency": "usd",
|
22
|
+
"evidence": {
|
23
|
+
"access_activity_log": null,
|
24
|
+
"billing_address": null,
|
25
|
+
"cancellation_policy": null,
|
26
|
+
"cancellation_policy_disclosure": null,
|
27
|
+
"cancellation_rebuttal": null,
|
28
|
+
"customer_communication": null,
|
29
|
+
"customer_email_address": null,
|
30
|
+
"customer_name": null,
|
31
|
+
"customer_purchase_ip": null,
|
32
|
+
"customer_signature": null,
|
33
|
+
"duplicate_charge_documentation": null,
|
34
|
+
"duplicate_charge_explanation": null,
|
35
|
+
"duplicate_charge_id": null,
|
36
|
+
"product_description": null,
|
37
|
+
"receipt": null,
|
38
|
+
"refund_policy": null,
|
39
|
+
"refund_policy_disclosure": null,
|
40
|
+
"refund_refusal_explanation": null,
|
41
|
+
"service_date": null,
|
42
|
+
"service_documentation": null,
|
43
|
+
"shipping_address": null,
|
44
|
+
"shipping_carrier": null,
|
45
|
+
"shipping_date": null,
|
46
|
+
"shipping_documentation": null,
|
47
|
+
"shipping_tracking_number": null,
|
48
|
+
"uncategorized_file": null,
|
49
|
+
"uncategorized_text": "Here is some evidence"
|
50
|
+
},
|
51
|
+
"evidence_details": {
|
52
|
+
"due_by": 1519603199,
|
53
|
+
"has_evidence": false,
|
54
|
+
"past_due": false,
|
55
|
+
"submission_count": 0
|
56
|
+
},
|
57
|
+
"is_charge_refundable": false,
|
58
|
+
"livemode": false,
|
59
|
+
"metadata": {
|
60
|
+
},
|
61
|
+
"reason": "general",
|
62
|
+
"status": "won"
|
63
|
+
}
|
64
|
+
}
|
65
|
+
}
|
@@ -0,0 +1,65 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"livemode": false,
|
4
|
+
"id": "evt_00000000000000",
|
5
|
+
"type": "charge.dispute.created",
|
6
|
+
"object": "event",
|
7
|
+
"request": null,
|
8
|
+
"pending_webhooks": 1,
|
9
|
+
"api_version": "2018-01-23",
|
10
|
+
"data": {
|
11
|
+
"object": {
|
12
|
+
"id": "dp_00000000000000",
|
13
|
+
"object": "dispute",
|
14
|
+
"amount": 1000,
|
15
|
+
"balance_transaction": "txn_00000000000000",
|
16
|
+
"balance_transactions": [
|
17
|
+
|
18
|
+
],
|
19
|
+
"charge": "ch_00000000000000",
|
20
|
+
"created": 1517922679,
|
21
|
+
"currency": "usd",
|
22
|
+
"evidence": {
|
23
|
+
"access_activity_log": null,
|
24
|
+
"billing_address": null,
|
25
|
+
"cancellation_policy": null,
|
26
|
+
"cancellation_policy_disclosure": null,
|
27
|
+
"cancellation_rebuttal": null,
|
28
|
+
"customer_communication": null,
|
29
|
+
"customer_email_address": null,
|
30
|
+
"customer_name": null,
|
31
|
+
"customer_purchase_ip": null,
|
32
|
+
"customer_signature": null,
|
33
|
+
"duplicate_charge_documentation": null,
|
34
|
+
"duplicate_charge_explanation": null,
|
35
|
+
"duplicate_charge_id": null,
|
36
|
+
"product_description": null,
|
37
|
+
"receipt": null,
|
38
|
+
"refund_policy": null,
|
39
|
+
"refund_policy_disclosure": null,
|
40
|
+
"refund_refusal_explanation": null,
|
41
|
+
"service_date": null,
|
42
|
+
"service_documentation": null,
|
43
|
+
"shipping_address": null,
|
44
|
+
"shipping_carrier": null,
|
45
|
+
"shipping_date": null,
|
46
|
+
"shipping_documentation": null,
|
47
|
+
"shipping_tracking_number": null,
|
48
|
+
"uncategorized_file": null,
|
49
|
+
"uncategorized_text": null
|
50
|
+
},
|
51
|
+
"evidence_details": {
|
52
|
+
"due_by": 1519603199,
|
53
|
+
"has_evidence": false,
|
54
|
+
"past_due": false,
|
55
|
+
"submission_count": 0
|
56
|
+
},
|
57
|
+
"is_charge_refundable": false,
|
58
|
+
"livemode": false,
|
59
|
+
"metadata": {
|
60
|
+
},
|
61
|
+
"reason": "general",
|
62
|
+
"status": "needs_response"
|
63
|
+
}
|
64
|
+
}
|
65
|
+
}
|
data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.dispute.funds_reinstated.json
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"livemode": false,
|
4
|
+
"id": "evt_00000000000000",
|
5
|
+
"type": "charge.dispute.funds_reinstated",
|
6
|
+
"object": "event",
|
7
|
+
"request": null,
|
8
|
+
"pending_webhooks": 1,
|
9
|
+
"api_version": "2018-01-23",
|
10
|
+
"data": {
|
11
|
+
"object": {
|
12
|
+
"id": "dp_00000000000000",
|
13
|
+
"object": "dispute",
|
14
|
+
"amount": 1000,
|
15
|
+
"balance_transaction": "txn_00000000000000",
|
16
|
+
"balance_transactions": [
|
17
|
+
|
18
|
+
],
|
19
|
+
"charge": "ch_00000000000000",
|
20
|
+
"created": 1517922729,
|
21
|
+
"currency": "usd",
|
22
|
+
"evidence": {
|
23
|
+
"access_activity_log": null,
|
24
|
+
"billing_address": null,
|
25
|
+
"cancellation_policy": null,
|
26
|
+
"cancellation_policy_disclosure": null,
|
27
|
+
"cancellation_rebuttal": null,
|
28
|
+
"customer_communication": null,
|
29
|
+
"customer_email_address": null,
|
30
|
+
"customer_name": null,
|
31
|
+
"customer_purchase_ip": null,
|
32
|
+
"customer_signature": null,
|
33
|
+
"duplicate_charge_documentation": null,
|
34
|
+
"duplicate_charge_explanation": null,
|
35
|
+
"duplicate_charge_id": null,
|
36
|
+
"product_description": null,
|
37
|
+
"receipt": null,
|
38
|
+
"refund_policy": null,
|
39
|
+
"refund_policy_disclosure": null,
|
40
|
+
"refund_refusal_explanation": null,
|
41
|
+
"service_date": null,
|
42
|
+
"service_documentation": null,
|
43
|
+
"shipping_address": null,
|
44
|
+
"shipping_carrier": null,
|
45
|
+
"shipping_date": null,
|
46
|
+
"shipping_documentation": null,
|
47
|
+
"shipping_tracking_number": null,
|
48
|
+
"uncategorized_file": null,
|
49
|
+
"uncategorized_text": null
|
50
|
+
},
|
51
|
+
"evidence_details": {
|
52
|
+
"due_by": 1519603199,
|
53
|
+
"has_evidence": false,
|
54
|
+
"past_due": false,
|
55
|
+
"submission_count": 0
|
56
|
+
},
|
57
|
+
"is_charge_refundable": false,
|
58
|
+
"livemode": false,
|
59
|
+
"metadata": {
|
60
|
+
},
|
61
|
+
"reason": "general",
|
62
|
+
"status": "needs_response"
|
63
|
+
}
|
64
|
+
}
|
65
|
+
}
|
data/lib/stripe_model_callbacks/fixtures/stripe_events/charge/charge.dispute.funds_withdrawn.json
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"livemode": false,
|
4
|
+
"id": "evt_00000000000000",
|
5
|
+
"type": "charge.dispute.funds_withdrawn",
|
6
|
+
"object": "event",
|
7
|
+
"request": null,
|
8
|
+
"pending_webhooks": 1,
|
9
|
+
"api_version": "2018-01-23",
|
10
|
+
"data": {
|
11
|
+
"object": {
|
12
|
+
"id": "dp_00000000000000",
|
13
|
+
"object": "dispute",
|
14
|
+
"amount": 1000,
|
15
|
+
"balance_transaction": "txn_00000000000000",
|
16
|
+
"balance_transactions": [
|
17
|
+
|
18
|
+
],
|
19
|
+
"charge": "ch_00000000000000",
|
20
|
+
"created": 1517922760,
|
21
|
+
"currency": "usd",
|
22
|
+
"evidence": {
|
23
|
+
"access_activity_log": null,
|
24
|
+
"billing_address": null,
|
25
|
+
"cancellation_policy": null,
|
26
|
+
"cancellation_policy_disclosure": null,
|
27
|
+
"cancellation_rebuttal": null,
|
28
|
+
"customer_communication": null,
|
29
|
+
"customer_email_address": null,
|
30
|
+
"customer_name": null,
|
31
|
+
"customer_purchase_ip": null,
|
32
|
+
"customer_signature": null,
|
33
|
+
"duplicate_charge_documentation": null,
|
34
|
+
"duplicate_charge_explanation": null,
|
35
|
+
"duplicate_charge_id": null,
|
36
|
+
"product_description": null,
|
37
|
+
"receipt": null,
|
38
|
+
"refund_policy": null,
|
39
|
+
"refund_policy_disclosure": null,
|
40
|
+
"refund_refusal_explanation": null,
|
41
|
+
"service_date": null,
|
42
|
+
"service_documentation": null,
|
43
|
+
"shipping_address": null,
|
44
|
+
"shipping_carrier": null,
|
45
|
+
"shipping_date": null,
|
46
|
+
"shipping_documentation": null,
|
47
|
+
"shipping_tracking_number": null,
|
48
|
+
"uncategorized_file": null,
|
49
|
+
"uncategorized_text": null
|
50
|
+
},
|
51
|
+
"evidence_details": {
|
52
|
+
"due_by": 1519603199,
|
53
|
+
"has_evidence": false,
|
54
|
+
"past_due": false,
|
55
|
+
"submission_count": 0
|
56
|
+
},
|
57
|
+
"is_charge_refundable": false,
|
58
|
+
"livemode": false,
|
59
|
+
"metadata": {
|
60
|
+
},
|
61
|
+
"reason": "general",
|
62
|
+
"status": "needs_response"
|
63
|
+
}
|
64
|
+
}
|
65
|
+
}
|
@@ -0,0 +1,96 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"livemode": false,
|
4
|
+
"id": "evt_00000000000000",
|
5
|
+
"type": "charge.dispute.updated",
|
6
|
+
"object": "event",
|
7
|
+
"request": null,
|
8
|
+
"pending_webhooks": 1,
|
9
|
+
"api_version": "2018-01-23",
|
10
|
+
"data": {
|
11
|
+
"object": {
|
12
|
+
"id": "dp_00000000000000",
|
13
|
+
"object": "dispute",
|
14
|
+
"amount": 1000,
|
15
|
+
"balance_transaction": "txn_00000000000000",
|
16
|
+
"balance_transactions": [
|
17
|
+
|
18
|
+
],
|
19
|
+
"charge": "ch_00000000000000",
|
20
|
+
"created": 1517922776,
|
21
|
+
"currency": "usd",
|
22
|
+
"evidence": {
|
23
|
+
"access_activity_log": null,
|
24
|
+
"billing_address": null,
|
25
|
+
"cancellation_policy": null,
|
26
|
+
"cancellation_policy_disclosure": null,
|
27
|
+
"cancellation_rebuttal": null,
|
28
|
+
"customer_communication": null,
|
29
|
+
"customer_email_address": null,
|
30
|
+
"customer_name": null,
|
31
|
+
"customer_purchase_ip": null,
|
32
|
+
"customer_signature": null,
|
33
|
+
"duplicate_charge_documentation": null,
|
34
|
+
"duplicate_charge_explanation": null,
|
35
|
+
"duplicate_charge_id": null,
|
36
|
+
"product_description": null,
|
37
|
+
"receipt": null,
|
38
|
+
"refund_policy": null,
|
39
|
+
"refund_policy_disclosure": null,
|
40
|
+
"refund_refusal_explanation": null,
|
41
|
+
"service_date": null,
|
42
|
+
"service_documentation": null,
|
43
|
+
"shipping_address": null,
|
44
|
+
"shipping_carrier": null,
|
45
|
+
"shipping_date": null,
|
46
|
+
"shipping_documentation": null,
|
47
|
+
"shipping_tracking_number": null,
|
48
|
+
"uncategorized_file": null,
|
49
|
+
"uncategorized_text": "Here is some evidence"
|
50
|
+
},
|
51
|
+
"evidence_details": {
|
52
|
+
"due_by": 1519603199,
|
53
|
+
"has_evidence": false,
|
54
|
+
"past_due": false,
|
55
|
+
"submission_count": 0
|
56
|
+
},
|
57
|
+
"is_charge_refundable": false,
|
58
|
+
"livemode": false,
|
59
|
+
"metadata": {
|
60
|
+
},
|
61
|
+
"reason": "general",
|
62
|
+
"status": "under_review"
|
63
|
+
},
|
64
|
+
"previous_attributes": {
|
65
|
+
"evidence": {
|
66
|
+
"access_activity_log": null,
|
67
|
+
"billing_address": null,
|
68
|
+
"cancellation_policy": null,
|
69
|
+
"cancellation_policy_disclosure": null,
|
70
|
+
"cancellation_rebuttal": null,
|
71
|
+
"customer_communication": null,
|
72
|
+
"customer_email_address": null,
|
73
|
+
"customer_name": null,
|
74
|
+
"customer_purchase_ip": null,
|
75
|
+
"customer_signature": null,
|
76
|
+
"duplicate_charge_documentation": null,
|
77
|
+
"duplicate_charge_explanation": null,
|
78
|
+
"duplicate_charge_id": null,
|
79
|
+
"product_description": null,
|
80
|
+
"receipt": null,
|
81
|
+
"refund_policy": null,
|
82
|
+
"refund_policy_disclosure": null,
|
83
|
+
"refund_refusal_explanation": null,
|
84
|
+
"service_date": null,
|
85
|
+
"service_documentation": null,
|
86
|
+
"shipping_address": null,
|
87
|
+
"shipping_carrier": null,
|
88
|
+
"shipping_date": null,
|
89
|
+
"shipping_documentation": null,
|
90
|
+
"shipping_tracking_number": null,
|
91
|
+
"uncategorized_file": null,
|
92
|
+
"uncategorized_text": "Old uncategorized text"
|
93
|
+
}
|
94
|
+
}
|
95
|
+
}
|
96
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"livemode": false,
|
4
|
+
"id": "evt_00000000000000",
|
5
|
+
"type": "charge.refund.updated",
|
6
|
+
"object": "event",
|
7
|
+
"request": null,
|
8
|
+
"pending_webhooks": 1,
|
9
|
+
"api_version": "2018-01-23",
|
10
|
+
"data": {
|
11
|
+
"object": {
|
12
|
+
"id": "re_00000000000000",
|
13
|
+
"object": "refund",
|
14
|
+
"amount": 100,
|
15
|
+
"balance_transaction": null,
|
16
|
+
"charge": "ch_00000000000000",
|
17
|
+
"created": 1517848627,
|
18
|
+
"currency": "usd",
|
19
|
+
"metadata": {
|
20
|
+
},
|
21
|
+
"reason": null,
|
22
|
+
"receipt_number": null,
|
23
|
+
"status": "succeeded"
|
24
|
+
},
|
25
|
+
"previous_attributes": {
|
26
|
+
}
|
27
|
+
}
|
28
|
+
}
|
@@ -0,0 +1,98 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"livemode": false,
|
4
|
+
"id": "evt_00000000000000",
|
5
|
+
"type": "charge.refunded",
|
6
|
+
"object": "event",
|
7
|
+
"request": null,
|
8
|
+
"pending_webhooks": 1,
|
9
|
+
"api_version": "2018-01-23",
|
10
|
+
"data": {
|
11
|
+
"object": {
|
12
|
+
"id": "ch_00000000000000",
|
13
|
+
"object": "charge",
|
14
|
+
"amount": 100,
|
15
|
+
"amount_refunded": 100,
|
16
|
+
"application": null,
|
17
|
+
"application_fee": null,
|
18
|
+
"balance_transaction": "txn_00000000000000",
|
19
|
+
"captured": false,
|
20
|
+
"created": 1517772969,
|
21
|
+
"currency": "usd",
|
22
|
+
"customer": null,
|
23
|
+
"description": "My First Test Charge (created for API docs)",
|
24
|
+
"destination": null,
|
25
|
+
"dispute": null,
|
26
|
+
"failure_code": null,
|
27
|
+
"failure_message": null,
|
28
|
+
"fraud_details": {
|
29
|
+
},
|
30
|
+
"invoice": null,
|
31
|
+
"livemode": false,
|
32
|
+
"metadata": {
|
33
|
+
},
|
34
|
+
"on_behalf_of": null,
|
35
|
+
"order": null,
|
36
|
+
"outcome": null,
|
37
|
+
"paid": true,
|
38
|
+
"receipt_email": null,
|
39
|
+
"receipt_number": null,
|
40
|
+
"refunded": true,
|
41
|
+
"refunds": {
|
42
|
+
"object": "list",
|
43
|
+
"data": [
|
44
|
+
{
|
45
|
+
"id": "re_CGQ7INZZQPOC8U",
|
46
|
+
"object": "refund",
|
47
|
+
"amount": 100,
|
48
|
+
"balance_transaction": "txn_CGQ7Sq2yeAIYK4",
|
49
|
+
"charge": "ch_1BrtHZAT5SYrvIfdqkyvLyvX",
|
50
|
+
"created": 1517772969,
|
51
|
+
"currency": "usd",
|
52
|
+
"metadata": {
|
53
|
+
},
|
54
|
+
"reason": null,
|
55
|
+
"receipt_number": "1527-1121",
|
56
|
+
"status": "succeeded"
|
57
|
+
}
|
58
|
+
],
|
59
|
+
"has_more": false,
|
60
|
+
"total_count": 0,
|
61
|
+
"url": "/v1/charges/ch_1BrtHZAT5SYrvIfdqkyvLyvX/refunds"
|
62
|
+
},
|
63
|
+
"review": null,
|
64
|
+
"shipping": null,
|
65
|
+
"source": {
|
66
|
+
"id": "card_00000000000000",
|
67
|
+
"object": "card",
|
68
|
+
"address_city": null,
|
69
|
+
"address_country": null,
|
70
|
+
"address_line1": null,
|
71
|
+
"address_line1_check": null,
|
72
|
+
"address_line2": null,
|
73
|
+
"address_state": null,
|
74
|
+
"address_zip": null,
|
75
|
+
"address_zip_check": null,
|
76
|
+
"brand": "Visa",
|
77
|
+
"country": "US",
|
78
|
+
"customer": "cus_00000000000000",
|
79
|
+
"cvc_check": null,
|
80
|
+
"dynamic_last4": null,
|
81
|
+
"exp_month": 1,
|
82
|
+
"exp_year": 2040,
|
83
|
+
"fingerprint": "eBMS9YyeR6KZs4yl",
|
84
|
+
"funding": "credit",
|
85
|
+
"last4": "4242",
|
86
|
+
"metadata": {
|
87
|
+
},
|
88
|
+
"name": null,
|
89
|
+
"tokenization_method": null
|
90
|
+
},
|
91
|
+
"source_transfer": null,
|
92
|
+
"statement_descriptor": null,
|
93
|
+
"status": "succeeded",
|
94
|
+
"transfer_group": null,
|
95
|
+
"fee": 0
|
96
|
+
}
|
97
|
+
}
|
98
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"livemode": false,
|
4
|
+
"id": "evt_00000000000000",
|
5
|
+
"type": "coupon.created",
|
6
|
+
"object": "event",
|
7
|
+
"request": null,
|
8
|
+
"pending_webhooks": 1,
|
9
|
+
"api_version": "2018-01-23",
|
10
|
+
"data": {
|
11
|
+
"object": {
|
12
|
+
"id": "25OFF_00000000000000",
|
13
|
+
"object": "coupon",
|
14
|
+
"amount_off": null,
|
15
|
+
"created": 1517909275,
|
16
|
+
"currency": null,
|
17
|
+
"duration": "repeating",
|
18
|
+
"duration_in_months": 3,
|
19
|
+
"livemode": false,
|
20
|
+
"max_redemptions": null,
|
21
|
+
"metadata": {
|
22
|
+
},
|
23
|
+
"percent_off": 25,
|
24
|
+
"redeem_by": null,
|
25
|
+
"times_redeemed": 0,
|
26
|
+
"valid": true
|
27
|
+
}
|
28
|
+
}
|
29
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"livemode": false,
|
4
|
+
"id": "evt_00000000000000",
|
5
|
+
"type": "coupon.deleted",
|
6
|
+
"object": "event",
|
7
|
+
"request": null,
|
8
|
+
"pending_webhooks": 1,
|
9
|
+
"api_version": "2018-01-23",
|
10
|
+
"data": {
|
11
|
+
"object": {
|
12
|
+
"id": "25OFF_00000000000000",
|
13
|
+
"object": "coupon",
|
14
|
+
"amount_off": null,
|
15
|
+
"created": 1517909296,
|
16
|
+
"currency": null,
|
17
|
+
"duration": "repeating",
|
18
|
+
"duration_in_months": 3,
|
19
|
+
"livemode": false,
|
20
|
+
"max_redemptions": null,
|
21
|
+
"metadata": {
|
22
|
+
},
|
23
|
+
"percent_off": 25,
|
24
|
+
"redeem_by": null,
|
25
|
+
"times_redeemed": 0,
|
26
|
+
"valid": true
|
27
|
+
}
|
28
|
+
}
|
29
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"livemode": false,
|
4
|
+
"id": "evt_00000000000000",
|
5
|
+
"type": "coupon.updated",
|
6
|
+
"object": "event",
|
7
|
+
"request": null,
|
8
|
+
"pending_webhooks": 1,
|
9
|
+
"api_version": "2018-01-23",
|
10
|
+
"data": {
|
11
|
+
"object": {
|
12
|
+
"id": "25OFF_00000000000000",
|
13
|
+
"object": "coupon",
|
14
|
+
"amount_off": null,
|
15
|
+
"created": 1517909309,
|
16
|
+
"currency": null,
|
17
|
+
"duration": "repeating",
|
18
|
+
"duration_in_months": 3,
|
19
|
+
"livemode": false,
|
20
|
+
"max_redemptions": null,
|
21
|
+
"metadata": {
|
22
|
+
},
|
23
|
+
"percent_off": 25,
|
24
|
+
"redeem_by": null,
|
25
|
+
"times_redeemed": 0,
|
26
|
+
"valid": true
|
27
|
+
},
|
28
|
+
"previous_attributes": {
|
29
|
+
}
|
30
|
+
}
|
31
|
+
}
|
data/lib/stripe_model_callbacks/fixtures/stripe_events/customer/customer.bank_account.deleted.json
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
{
|
2
|
+
"created": 1326853478,
|
3
|
+
"livemode": false,
|
4
|
+
"id": "evt_00000000000000",
|
5
|
+
"type": "customer.bank_account.deleted",
|
6
|
+
"object": "event",
|
7
|
+
"request": null,
|
8
|
+
"pending_webhooks": 1,
|
9
|
+
"api_version": "2018-02-05",
|
10
|
+
"data": {
|
11
|
+
"object": {
|
12
|
+
"id": "ba_00000000000000",
|
13
|
+
"object": "bank_account",
|
14
|
+
"account": "acct_00000000000000",
|
15
|
+
"account_holder_name": "Jane Austen",
|
16
|
+
"account_holder_type": "individual",
|
17
|
+
"bank_name": "STRIPE TEST BANK",
|
18
|
+
"country": "US",
|
19
|
+
"currency": "dkk",
|
20
|
+
"default_for_currency": false,
|
21
|
+
"fingerprint": "8hxBTDA6RPbX37IN",
|
22
|
+
"last4": "6789",
|
23
|
+
"metadata": {
|
24
|
+
},
|
25
|
+
"routing_number": "110000000",
|
26
|
+
"status": "new"
|
27
|
+
}
|
28
|
+
}
|
29
|
+
}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
{
|
2
|
+
"id": "evt_customer_created",
|
3
|
+
"created": 1384544738,
|
4
|
+
"livemode": false,
|
5
|
+
"type": "customer.created",
|
6
|
+
"data": {
|
7
|
+
"object": {
|
8
|
+
"object": "customer",
|
9
|
+
"created": 1384544738,
|
10
|
+
"id": "cus_2wm5EgmRGEiyPO",
|
11
|
+
"livemode": false,
|
12
|
+
"description": "id:12345",
|
13
|
+
"email": "user@example.com",
|
14
|
+
"delinquent": false,
|
15
|
+
"metadata": {
|
16
|
+
},
|
17
|
+
"subscription": null,
|
18
|
+
"discount": null,
|
19
|
+
"account_balance": 0,
|
20
|
+
"cards": {
|
21
|
+
"object": "list",
|
22
|
+
"count": 0,
|
23
|
+
"url": "/v1/customers/cus_2wm5EgmRGEiyPO/cards",
|
24
|
+
"data": [
|
25
|
+
|
26
|
+
]
|
27
|
+
},
|
28
|
+
"default_card": null,
|
29
|
+
"next_recurring_charge": null,
|
30
|
+
"active_card": null
|
31
|
+
}
|
32
|
+
},
|
33
|
+
"object": "event",
|
34
|
+
"pending_webhooks": 1,
|
35
|
+
"request": "iar_2wm5M67yu99gVP"
|
36
|
+
}
|