stripe_model_callbacks 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +153 -0
  4. data/Rakefile +26 -0
  5. data/app/assets/config/stripe_model_callbacks_manifest.js +2 -0
  6. data/app/assets/javascripts/stripe_model_callbacks/application.js +13 -0
  7. data/app/assets/stylesheets/stripe_model_callbacks/application.css +15 -0
  8. data/app/controllers/stripe_model_callbacks/application_controller.rb +3 -0
  9. data/app/jobs/stripe_model_callbacks/application_job.rb +2 -0
  10. data/app/mailers/stripe_model_callbacks/application_mailer.rb +4 -0
  11. data/app/models/stripe_model_callbacks/application_record.rb +60 -0
  12. data/app/services/stripe_model_callbacks/account/external_account/updated_service.rb +13 -0
  13. data/app/services/stripe_model_callbacks/attributes_assigner_service.rb +35 -0
  14. data/app/services/stripe_model_callbacks/base_event_service.rb +9 -0
  15. data/app/services/stripe_model_callbacks/base_service.rb +26 -0
  16. data/app/services/stripe_model_callbacks/charge/dispute_updated_service.rb +29 -0
  17. data/app/services/stripe_model_callbacks/charge/updated_service.rb +40 -0
  18. data/app/services/stripe_model_callbacks/configure_service.rb +217 -0
  19. data/app/services/stripe_model_callbacks/coupon/updated_service.rb +18 -0
  20. data/app/services/stripe_model_callbacks/customer/bank_account/deleted_service.rb +13 -0
  21. data/app/services/stripe_model_callbacks/customer/deleted_service.rb +13 -0
  22. data/app/services/stripe_model_callbacks/customer/discount_updated_service.rb +32 -0
  23. data/app/services/stripe_model_callbacks/customer/source_updated_service.rb +25 -0
  24. data/app/services/stripe_model_callbacks/customer/subscription/updated_service.rb +28 -0
  25. data/app/services/stripe_model_callbacks/customer/updated_service.rb +13 -0
  26. data/app/services/stripe_model_callbacks/event_mocker_service.rb +38 -0
  27. data/app/services/stripe_model_callbacks/invoice/updated_service.rb +26 -0
  28. data/app/services/stripe_model_callbacks/invoice_item/updated_service.rb +13 -0
  29. data/app/services/stripe_model_callbacks/notifier_service.rb +6 -0
  30. data/app/services/stripe_model_callbacks/order/updated_service.rb +28 -0
  31. data/app/services/stripe_model_callbacks/payout/updated_service.rb +29 -0
  32. data/app/services/stripe_model_callbacks/plan/updated_service.rb +14 -0
  33. data/app/services/stripe_model_callbacks/product/updated_service.rb +14 -0
  34. data/app/services/stripe_model_callbacks/recipient/updated_service.rb +14 -0
  35. data/app/services/stripe_model_callbacks/refund/updated_service.rb +12 -0
  36. data/app/services/stripe_model_callbacks/review/updated_service.rb +13 -0
  37. data/app/services/stripe_model_callbacks/sku/updated_service.rb +14 -0
  38. data/app/services/stripe_model_callbacks/source/updated_service.rb +31 -0
  39. data/app/services/stripe_model_callbacks/subscription/state_checker_service.rb +21 -0
  40. data/app/services/stripe_model_callbacks/transfer/updated_service.rb +18 -0
  41. data/app/views/layouts/stripe_model_callbacks/application.html.erb +14 -0
  42. data/config/rails_best_practices.yml +49 -0
  43. data/config/routes.rb +2 -0
  44. data/db/migrate/20180206115801_create_stripe_charges.rb +54 -0
  45. data/db/migrate/20180206115802_create_stripe_coupons.rb +22 -0
  46. data/db/migrate/20180206115803_create_stripe_customers.rb +21 -0
  47. data/db/migrate/20180206115804_create_stripe_discounts.rb +27 -0
  48. data/db/migrate/20180206115805_create_stripe_invoice_items.rb +26 -0
  49. data/db/migrate/20180206115806_create_stripe_invoices.rb +57 -0
  50. data/db/migrate/20180206115807_create_stripe_order_items.rb +15 -0
  51. data/db/migrate/20180206115808_create_stripe_orders.rb +46 -0
  52. data/db/migrate/20180206115809_create_stripe_payouts.rb +27 -0
  53. data/db/migrate/20180206115810_create_stripe_plans.rb +20 -0
  54. data/db/migrate/20180206115811_create_stripe_products.rb +25 -0
  55. data/db/migrate/20180206115812_create_stripe_recipients.rb +18 -0
  56. data/db/migrate/20180206115813_create_stripe_refunds.rb +21 -0
  57. data/db/migrate/20180206115814_create_stripe_skus.rb +22 -0
  58. data/db/migrate/20180206115815_create_stripe_sources.rb +70 -0
  59. data/db/migrate/20180206115816_create_stripe_subscriptions.rb +29 -0
  60. data/db/migrate/20180206115817_create_stripe_transfers.rb +25 -0
  61. data/db/migrate/20180206130408_create_disputes.rb +76 -0
  62. data/db/migrate/20180206151132_change_activities_trackable_id_to_string.rb +5 -0
  63. data/db/migrate/20180207121808_create_stripe_subscription_items.rb +14 -0
  64. data/db/migrate/20180207171559_remove_name_from_stripe_plans.rb +5 -0
  65. data/db/migrate/20180207172011_add_stripe_product_id_to_stripe_plans.rb +6 -0
  66. data/db/migrate/20180207185604_add_index_on_refund_charge.rb +5 -0
  67. data/db/migrate/20180208091647_change_stripe_subscription_items_quantity_to_integer.rb +5 -0
  68. data/db/migrate/20180208102513_add_attempt_count_to_stripe_invoices.rb +7 -0
  69. data/db/migrate/20180208121235_create_stripe_reviews.rb +13 -0
  70. data/db/migrate/20180208122654_create_stripe_bank_accounts.rb +20 -0
  71. data/db/migrate/20180208160046_add_nickname_to_stripe_plans.rb +5 -0
  72. data/db/migrate/20180211092437_rename_stripe_invoice_items_subscription_item.rb +6 -0
  73. data/db/migrate/20180216224335_rename_stripe_subscriptions_discount.rb +5 -0
  74. data/db/migrate/20180217200350_change_stripe_invoices_to_reference_discounts.rb +9 -0
  75. data/db/migrate/20180217204628_create_stripe_cards.rb +29 -0
  76. data/db/migrate/20180218092600_add_deleted_at_to_stripe_cards.rb +9 -0
  77. data/db/migrate/20181219121712_add_new_primary_id_and_rename_old.rb +37 -0
  78. data/db/migrate/20190629112050_rename_stripe_invoice_date_to_created.rb +5 -0
  79. data/lib/stripe_model_callbacks.rb +19 -0
  80. data/lib/stripe_model_callbacks/autoload_models.rb +8 -0
  81. data/lib/stripe_model_callbacks/configuration.rb +23 -0
  82. data/lib/stripe_model_callbacks/engine.rb +5 -0
  83. data/lib/stripe_model_callbacks/event_mocker.rb +5 -0
  84. data/lib/stripe_model_callbacks/factory_bot_definitions.rb +7 -0
  85. data/lib/stripe_model_callbacks/models/stripe_bank_account.rb +17 -0
  86. data/lib/stripe_model_callbacks/models/stripe_card.rb +25 -0
  87. data/lib/stripe_model_callbacks/models/stripe_charge.rb +47 -0
  88. data/lib/stripe_model_callbacks/models/stripe_coupon.rb +24 -0
  89. data/lib/stripe_model_callbacks/models/stripe_customer.rb +23 -0
  90. data/lib/stripe_model_callbacks/models/stripe_discount.rb +53 -0
  91. data/lib/stripe_model_callbacks/models/stripe_dispute.rb +86 -0
  92. data/lib/stripe_model_callbacks/models/stripe_invoice.rb +88 -0
  93. data/lib/stripe_model_callbacks/models/stripe_invoice_item.rb +33 -0
  94. data/lib/stripe_model_callbacks/models/stripe_order.rb +63 -0
  95. data/lib/stripe_model_callbacks/models/stripe_order_item.rb +20 -0
  96. data/lib/stripe_model_callbacks/models/stripe_payout.rb +26 -0
  97. data/lib/stripe_model_callbacks/models/stripe_plan.rb +32 -0
  98. data/lib/stripe_model_callbacks/models/stripe_product.rb +27 -0
  99. data/lib/stripe_model_callbacks/models/stripe_recipient.rb +16 -0
  100. data/lib/stripe_model_callbacks/models/stripe_refund.rb +28 -0
  101. data/lib/stripe_model_callbacks/models/stripe_review.rb +18 -0
  102. data/lib/stripe_model_callbacks/models/stripe_sku.rb +28 -0
  103. data/lib/stripe_model_callbacks/models/stripe_source.rb +79 -0
  104. data/lib/stripe_model_callbacks/models/stripe_subscription.rb +101 -0
  105. data/lib/stripe_model_callbacks/models/stripe_subscription_item.rb +36 -0
  106. data/lib/stripe_model_callbacks/models/stripe_transfer.rb +25 -0
  107. data/lib/stripe_model_callbacks/require_models.rb +7 -0
  108. data/lib/stripe_model_callbacks/version.rb +3 -0
  109. data/lib/tasks/stripe_model_callbacks_tasks.rake +4 -0
  110. metadata +249 -0
@@ -0,0 +1,27 @@
1
+ class CreateStripeDiscounts < ActiveRecord::Migration[5.0]
2
+ def change
3
+ create_table :stripe_discounts do |t|
4
+ t.string :stripe_coupon_id, index: true
5
+ t.string :stripe_customer_id, index: true
6
+ t.string :stripe_subscription_id, index: true
7
+ t.integer :coupon_amount_off_cents
8
+ t.string :coupon_amount_off_currency
9
+ t.string :coupon_currency
10
+ t.datetime :coupon_created
11
+ t.string :coupon_duration
12
+ t.integer :coupon_duration_in_months
13
+ t.boolean :coupon_livemode
14
+ t.integer :coupon_max_redemptions
15
+ t.text :coupon_metadata
16
+ t.integer :coupon_percent_off
17
+ t.integer :coupon_redeem_by
18
+ t.integer :coupon_times_redeemed
19
+ t.boolean :coupon_valid
20
+ t.datetime :created
21
+ t.datetime :deleted_at
22
+ t.datetime :start
23
+ t.datetime :end
24
+ t.timestamps
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,26 @@
1
+ class CreateStripeInvoiceItems < ActiveRecord::Migration[5.0]
2
+ def change
3
+ create_table :stripe_invoice_items do |t|
4
+ t.string :stripe_id, index: true, null: false
5
+ t.integer :amount_cents
6
+ t.string :amount_currency
7
+ t.string :stripe_customer_id, index: true
8
+ t.string :currency, null: false
9
+ t.date :datetime
10
+ t.datetime :deleted_at, index: true
11
+ t.string :description
12
+ t.boolean :discountable, null: false
13
+ t.string :stripe_invoice_id, index: true
14
+ t.boolean :livemode, default: true, null: false
15
+ t.text :metadata
16
+ t.datetime :period_start
17
+ t.datetime :period_end
18
+ t.string :stripe_plan_id, index: true
19
+ t.boolean :proration, null: false
20
+ t.integer :quantity
21
+ t.string :stripe_subscription_id, index: true
22
+ t.string :subscription_item
23
+ t.timestamps
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,57 @@
1
+ class CreateStripeInvoices < ActiveRecord::Migration[5.0]
2
+ def change
3
+ create_table :stripe_invoices do |table|
4
+ table.string :stripe_id, index: true, null: false
5
+ amount_columns(table)
6
+ customer_columns(table)
7
+ table.boolean :attempted, null: false
8
+ table.datetime :next_payment_attempt
9
+ table.boolean :closed, null: false
10
+ table.datetime :date, null: false
11
+ table.datetime :due_date
12
+ table.boolean :livemode, default: true, null: false
13
+ table.text :metadata
14
+ table.string :number
15
+ table.boolean :paid, null: false
16
+ table.datetime :period_start
17
+ table.datetime :period_end
18
+ table.integer :starting_balance_cents
19
+ table.string :starting_balance_currency
20
+ table.string :statement_descriptor
21
+ table.datetime :subscription_proration_date
22
+ table.datetime :webhooks_delivered_at
23
+ table.timestamps
24
+ end
25
+ end
26
+
27
+ private
28
+
29
+ def amount_columns(table)
30
+ table.integer :amount_due_cents, null: false
31
+ table.string :amount_due_currency, null: false
32
+ table.integer :application_fee_cents
33
+ table.string :application_fee_currency
34
+ table.string :billing, null: false
35
+ table.integer :discount_cents
36
+ table.string :discount_currency
37
+ table.integer :ending_balance_cents
38
+ table.integer :ending_balance_currency
39
+ table.string :stripe_charge_id, index: true
40
+ table.string :currency, null: false
41
+ table.integer :subtotal_cents
42
+ table.string :subtotal_currency
43
+ table.integer :tax_cents
44
+ table.string :tax_currency
45
+ table.decimal :tax_percent
46
+ table.integer :total_cents
47
+ table.string :total_currency
48
+ end
49
+
50
+ def customer_columns(table)
51
+ table.string :stripe_customer_id, index: true, null: false
52
+ table.string :description
53
+ table.boolean :forgiven, null: false
54
+ table.string :receipt_number
55
+ table.string :stripe_subscription_id, index: true
56
+ end
57
+ end
@@ -0,0 +1,15 @@
1
+ class CreateStripeOrderItems < ActiveRecord::Migration[5.0]
2
+ def change
3
+ create_table :stripe_order_items do |t|
4
+ t.string :parent_id, index: true, null: false
5
+ t.string :stripe_order_id, index: true, null: false
6
+ t.integer :amount_cents, null: false
7
+ t.string :amount_currency, null: false
8
+ t.string :currency, null: false
9
+ t.string :description
10
+ t.integer :quantity
11
+ t.string :order_item_type
12
+ t.timestamps
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,46 @@
1
+ class CreateStripeOrders < ActiveRecord::Migration[5.0]
2
+ def change
3
+ create_table :stripe_orders do |table|
4
+ table.string :stripe_id, index: true, null: false
5
+ amount_columns(table)
6
+ table.string :stripe_charge_id, index: true
7
+ table.string :currency, null: false
8
+ table.string :stripe_customer_id, index: true
9
+ table.string :email
10
+ table.boolean :livemode, default: true, null: false
11
+ table.text :metadata
12
+ shipping_columns(table)
13
+ table.string :status, null: false
14
+ table.datetime :created
15
+ table.datetime :updated
16
+ table.timestamps
17
+ end
18
+ end
19
+
20
+ private
21
+
22
+ def amount_columns(table)
23
+ table.integer :amount_cents, null: false
24
+ table.string :amount_currency, null: false
25
+ table.integer :amount_returned_cents
26
+ table.string :amount_returned_currency
27
+ table.integer :application_cents
28
+ table.string :application_currency
29
+ table.integer :application_fee
30
+ end
31
+
32
+ def shipping_columns(table)
33
+ table.string :selected_shipping_method
34
+ table.string :shipping_address_city
35
+ table.string :shipping_address_country
36
+ table.string :shipping_address_line1
37
+ table.string :shipping_address_line2
38
+ table.string :shipping_address_postal_code
39
+ table.string :shipping_address_state
40
+ table.string :shipping_carrier
41
+ table.string :shipping_name
42
+ table.string :shipping_phone
43
+ table.string :shipping_tracking_number
44
+ table.string :shipping_methods
45
+ end
46
+ end
@@ -0,0 +1,27 @@
1
+ class CreateStripePayouts < ActiveRecord::Migration[5.0]
2
+ def change
3
+ create_table :stripe_payouts do |t|
4
+ t.string :stripe_id, index: true, null: false
5
+ t.integer :amount_cents
6
+ t.string :amount_currency
7
+ t.datetime :arrival_date
8
+ t.boolean :automatic
9
+ t.string :balance_transaction
10
+ t.datetime :created
11
+ t.string :currency
12
+ t.string :description
13
+ t.string :destination
14
+ t.string :failure_balance_transaction
15
+ t.string :failure_code
16
+ t.string :failure_message
17
+ t.boolean :livemode
18
+ t.text :metadata
19
+ t.string :stripe_method
20
+ t.string :source_type
21
+ t.string :statement_descriptor
22
+ t.string :status
23
+ t.string :stripe_type
24
+ t.timestamps
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,20 @@
1
+ class CreateStripePlans < ActiveRecord::Migration[5.0]
2
+ def change
3
+ create_table :stripe_plans do |t|
4
+ t.string :stripe_id, index: true, null: false
5
+ t.integer :amount_cents, null: false
6
+ t.string :amount_currency, null: false
7
+ t.string :currency, null: false
8
+ t.string :interval, null: false
9
+ t.integer :interval_count, null: false
10
+ t.boolean :livemode, default: true, null: false
11
+ t.text :metadata
12
+ t.string :name, null: false
13
+ t.string :statement_descriptor
14
+ t.integer :trial_period_days
15
+ t.datetime :deleted_at, index: true
16
+ t.datetime :created
17
+ t.timestamps
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,25 @@
1
+ class CreateStripeProducts < ActiveRecord::Migration[5.0]
2
+ def change
3
+ create_table :stripe_products do |t|
4
+ t.string :stripe_id, index: true, null: false
5
+ t.boolean :active, default: false, null: false
6
+ t.datetime :deleted_at, index: true
7
+ t.text :stripe_attributes
8
+ t.string :caption
9
+ t.string :description
10
+ t.boolean :livemode, default: true, null: false
11
+ t.text :metadata
12
+ t.string :name
13
+ t.decimal :package_dimensions_height
14
+ t.decimal :package_dimensions_length
15
+ t.decimal :package_dimensions_weight
16
+ t.decimal :package_dimensions_width
17
+ t.boolean :shippable, default: false, null: false
18
+ t.string :statement_descriptor
19
+ t.text :url
20
+ t.datetime :created
21
+ t.datetime :updated
22
+ t.timestamps
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,18 @@
1
+ class CreateStripeRecipients < ActiveRecord::Migration[5.0]
2
+ def change
3
+ create_table :stripe_recipients do |t|
4
+ t.string :stripe_id, index: true, null: false
5
+ t.string :active_account
6
+ t.string :description
7
+ t.datetime :deleted_at, index: true
8
+ t.string :name
9
+ t.string :email
10
+ t.boolean :livemode, default: true, null: false
11
+ t.string :stripe_type
12
+ t.text :metadata
13
+ t.string :migrated_to
14
+ t.boolean :verified, default: false, null: false
15
+ t.timestamps
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,21 @@
1
+ class CreateStripeRefunds < ActiveRecord::Migration[5.0]
2
+ def change
3
+ create_table :stripe_refunds do |t|
4
+ t.string :stripe_id, index: true, null: false
5
+ t.integer :amount_cents
6
+ t.string :amount_currency
7
+ t.string :balance_transaction
8
+ t.string :stripe_charge_id, null: false
9
+ t.string :currency, null: false
10
+ t.string :failure_balance_transaction
11
+ t.string :failure_reason
12
+ t.boolean :livemode, default: true, null: false
13
+ t.text :metadata
14
+ t.string :reason
15
+ t.string :receipt_number
16
+ t.string :status
17
+ t.datetime :created
18
+ t.timestamps
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,22 @@
1
+ class CreateStripeSkus < ActiveRecord::Migration[5.0]
2
+ def change
3
+ create_table :stripe_skus do |t|
4
+ t.string :stripe_id, index: true, null: false
5
+ t.boolean :active, default: false, null: false
6
+ t.datetime :deleted_at, index: true
7
+ t.text :stripe_attributes
8
+ t.string :currency, null: false
9
+ t.integer :inventory_quantity
10
+ t.string :inventory_type
11
+ t.string :inventory_value
12
+ t.boolean :livemode
13
+ t.text :metadata
14
+ t.integer :price_cents
15
+ t.string :price_currency
16
+ t.string :stripe_product_id, index: true
17
+ t.datetime :created
18
+ t.datetime :updated
19
+ t.timestamps
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,70 @@
1
+ class CreateStripeSources < ActiveRecord::Migration[5.0]
2
+ def change
3
+ create_table :stripe_sources do |table|
4
+ table.string :stripe_id, index: true, null: false
5
+ table.integer :amount_cents
6
+ table.string :amount_currency
7
+ table.string :client_secret, null: false
8
+ table.string :currency
9
+ table.string :flow, null: false
10
+ table.boolean :livemode, default: true, null: false
11
+ table.string :metadata
12
+ create_owner_columns(table)
13
+ create_receiver_columns(table)
14
+ table.string :redirect_failure_reason
15
+ table.string :redirect_return_url
16
+ table.string :redirect_status
17
+ table.text :redirect_url
18
+ table.string :statement_descriptor
19
+ table.string :status
20
+ table.string :stripe_type
21
+ table.string :usage
22
+ create_ach_columns(table)
23
+ table.datetime :created
24
+ table.timestamps
25
+ end
26
+ end
27
+
28
+ private
29
+
30
+ def create_owner_columns(table)
31
+ table.string :owner_address_city
32
+ table.string :owner_address_country
33
+ table.string :owner_address_line1
34
+ table.string :owner_address_line2
35
+ table.string :owner_address_postal_code
36
+ table.string :owner_address_state
37
+ table.string :owner_email
38
+ table.string :owner_name
39
+ table.string :owner_phone
40
+ table.string :owner_verified_address_city
41
+ table.string :owner_verified_address_country
42
+ table.string :owner_verified_address_line1
43
+ table.string :owner_verified_address_line2
44
+ table.string :owner_verified_address_postal_code
45
+ table.string :owner_verified_address_state
46
+ table.string :owner_verified_email
47
+ table.string :owner_verified_name
48
+ table.string :owner_verified_phone
49
+ end
50
+
51
+ def create_receiver_columns(table)
52
+ table.string :receiver_address
53
+ table.integer :receiver_amount_charged_cents
54
+ table.string :receiver_amount_charged_currency
55
+ table.integer :receiver_amount_received_cents
56
+ table.string :receiver_amount_received_currency
57
+ table.integer :receiver_amount_returned_cents
58
+ table.string :receiver_amount_returned_currency
59
+ table.string :receiver_refund_attributes_method
60
+ table.string :receiver_refund_attributes_status
61
+ end
62
+
63
+ def create_ach_columns(table)
64
+ table.string :ach_credit_transfer_account_number
65
+ table.string :ach_credit_transfer_routing_number
66
+ table.string :ach_credit_transfer_fingerprint
67
+ table.string :ach_credit_transfer_bank_name
68
+ table.string :ach_credit_transfer_swift_code
69
+ end
70
+ end
@@ -0,0 +1,29 @@
1
+ class CreateStripeSubscriptions < ActiveRecord::Migration[5.0]
2
+ def change
3
+ create_table :stripe_subscriptions do |t|
4
+ t.string :stripe_id, index: true, null: false
5
+ t.integer :application_fee_percent
6
+ t.string :billing
7
+ t.boolean :cancel_at_period_end
8
+ t.datetime :canceled_at
9
+ t.datetime :current_period_start
10
+ t.datetime :current_period_end
11
+ t.string :stripe_customer_id, index: true
12
+ t.integer :days_until_due
13
+ t.string :discount, index: true
14
+ t.datetime :ended_at
15
+ t.boolean :livemode, default: true
16
+ t.text :metadata
17
+ t.string :stripe_plan_id, index: true
18
+ t.integer :quantity
19
+ t.datetime :start
20
+ t.integer :tax_percent
21
+ t.string :status, index: true
22
+ t.datetime :trial_start
23
+ t.datetime :trial_end
24
+ t.datetime :deleted_at, index: true
25
+ t.datetime :created
26
+ t.timestamps
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,25 @@
1
+ class CreateStripeTransfers < ActiveRecord::Migration[5.0]
2
+ def change
3
+ create_table :stripe_transfers do |t|
4
+ t.string :stripe_id, index: true, null: false
5
+ t.integer :amount_cents, null: false
6
+ t.string :amount_currency, null: false
7
+ t.integer :amount_reversed_cents, null: false
8
+ t.string :amount_reversed_currency, null: false
9
+ t.string :balance_transaction
10
+ t.datetime :created
11
+ t.string :currency, null: false
12
+ t.string :description
13
+ t.string :destination
14
+ t.string :destination_payment
15
+ t.boolean :livemode, default: true, null: false
16
+ t.text :metadata
17
+ t.boolean :reversed, default: false, null: false
18
+ t.string :source_transaction
19
+ t.string :source_type
20
+ t.string :transfer_group
21
+ t.string :status
22
+ t.timestamps
23
+ end
24
+ end
25
+ end