stripe 13.3.0.pre.beta.1 → 13.3.0.pre.beta.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (184) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -0
  3. data/OPENAPI_VERSION +1 -1
  4. data/VERSION +1 -1
  5. data/lib/stripe/object_types.rb +10 -0
  6. data/lib/stripe/resources/account.rb +230 -0
  7. data/lib/stripe/resources/account_link.rb +9 -0
  8. data/lib/stripe/resources/account_notice.rb +28 -0
  9. data/lib/stripe/resources/account_session.rb +103 -0
  10. data/lib/stripe/resources/apple_pay_domain.rb +13 -0
  11. data/lib/stripe/resources/application.rb +20 -0
  12. data/lib/stripe/resources/application_fee.rb +34 -0
  13. data/lib/stripe/resources/application_fee_refund.rb +17 -0
  14. data/lib/stripe/resources/apps/secret.rb +22 -0
  15. data/lib/stripe/resources/balance.rb +59 -0
  16. data/lib/stripe/resources/balance_transaction.rb +34 -0
  17. data/lib/stripe/resources/bank_account.rb +60 -2
  18. data/lib/stripe/resources/billing/alert.rb +21 -0
  19. data/lib/stripe/resources/billing/alert_triggered.rb +26 -0
  20. data/lib/stripe/resources/billing/credit_balance_summary.rb +25 -0
  21. data/lib/stripe/resources/billing/credit_balance_transaction.rb +45 -1
  22. data/lib/stripe/resources/billing/credit_grant.rb +46 -2
  23. data/lib/stripe/resources/billing/meter.rb +49 -7
  24. data/lib/stripe/resources/billing/meter_error_report.rb +44 -0
  25. data/lib/stripe/resources/billing/meter_event.rb +17 -3
  26. data/lib/stripe/resources/billing/meter_event_adjustment.rb +17 -1
  27. data/lib/stripe/resources/billing/meter_event_summary.rb +15 -0
  28. data/lib/stripe/resources/billing_portal/configuration.rb +70 -0
  29. data/lib/stripe/resources/billing_portal/session.rb +61 -0
  30. data/lib/stripe/resources/capability.rb +38 -0
  31. data/lib/stripe/resources/capital/financing_offer.rb +45 -0
  32. data/lib/stripe/resources/capital/financing_summary.rb +17 -0
  33. data/lib/stripe/resources/capital/financing_transaction.rb +29 -0
  34. data/lib/stripe/resources/card.rb +72 -0
  35. data/lib/stripe/resources/cash_balance.rb +14 -0
  36. data/lib/stripe/resources/charge.rb +469 -0
  37. data/lib/stripe/resources/checkout/session.rb +496 -0
  38. data/lib/stripe/resources/climate/order.rb +55 -0
  39. data/lib/stripe/resources/climate/product.rb +24 -0
  40. data/lib/stripe/resources/climate/supplier.rb +18 -0
  41. data/lib/stripe/resources/confirmation_token.rb +297 -0
  42. data/lib/stripe/resources/connect_collection_transfer.rb +24 -0
  43. data/lib/stripe/resources/country_spec.rb +27 -0
  44. data/lib/stripe/resources/coupon.rb +44 -0
  45. data/lib/stripe/resources/credit_note.rb +91 -0
  46. data/lib/stripe/resources/credit_note_line_item.rb +46 -0
  47. data/lib/stripe/resources/customer.rb +93 -0
  48. data/lib/stripe/resources/customer_balance_transaction.rb +27 -0
  49. data/lib/stripe/resources/customer_cash_balance_transaction.rb +72 -0
  50. data/lib/stripe/resources/customer_session.rb +34 -0
  51. data/lib/stripe/resources/discount.rb +29 -0
  52. data/lib/stripe/resources/dispute.rb +88 -0
  53. data/lib/stripe/resources/entitlements/active_entitlement.rb +11 -0
  54. data/lib/stripe/resources/entitlements/active_entitlement_summary.rb +23 -0
  55. data/lib/stripe/resources/entitlements/feature.rb +15 -0
  56. data/lib/stripe/resources/ephemeral_key.rb +13 -0
  57. data/lib/stripe/resources/event.rb +44 -0
  58. data/lib/stripe/resources/exchange_rate.rb +7 -0
  59. data/lib/stripe/resources/file.rb +23 -0
  60. data/lib/stripe/resources/file_link.rb +19 -0
  61. data/lib/stripe/resources/financial_connections/account.rb +84 -0
  62. data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +13 -0
  63. data/lib/stripe/resources/financial_connections/account_owner.rb +17 -0
  64. data/lib/stripe/resources/financial_connections/account_ownership.rb +9 -0
  65. data/lib/stripe/resources/financial_connections/institution.rb +35 -0
  66. data/lib/stripe/resources/financial_connections/session.rb +49 -0
  67. data/lib/stripe/resources/financial_connections/transaction.rb +28 -0
  68. data/lib/stripe/resources/forwarding/request.rb +40 -0
  69. data/lib/stripe/resources/funding_instructions.rb +82 -0
  70. data/lib/stripe/resources/gift_cards/card.rb +37 -0
  71. data/lib/stripe/resources/gift_cards/transaction.rb +39 -0
  72. data/lib/stripe/resources/identity/verification_report.rb +92 -0
  73. data/lib/stripe/resources/identity/verification_session.rb +76 -0
  74. data/lib/stripe/resources/invoice.rb +337 -0
  75. data/lib/stripe/resources/invoice_item.rb +54 -0
  76. data/lib/stripe/resources/invoice_line_item.rb +83 -0
  77. data/lib/stripe/resources/invoice_payment.rb +34 -0
  78. data/lib/stripe/resources/invoice_rendering_template.rb +17 -0
  79. data/lib/stripe/resources/issuing/authorization.rb +129 -0
  80. data/lib/stripe/resources/issuing/card.rb +86 -0
  81. data/lib/stripe/resources/issuing/cardholder.rb +76 -0
  82. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +57 -0
  83. data/lib/stripe/resources/issuing/dispute.rb +65 -0
  84. data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +23 -0
  85. data/lib/stripe/resources/issuing/fraud_liability_debit.rb +17 -0
  86. data/lib/stripe/resources/issuing/personalization_design.rb +38 -0
  87. data/lib/stripe/resources/issuing/physical_bundle.rb +18 -0
  88. data/lib/stripe/resources/issuing/settlement.rb +49 -0
  89. data/lib/stripe/resources/issuing/token.rb +46 -0
  90. data/lib/stripe/resources/issuing/transaction.rb +106 -0
  91. data/lib/stripe/resources/line_item.rb +50 -0
  92. data/lib/stripe/resources/login_link.rb +7 -0
  93. data/lib/stripe/resources/mandate.rb +78 -0
  94. data/lib/stripe/resources/margin.rb +19 -0
  95. data/lib/stripe/resources/order.rb +202 -0
  96. data/lib/stripe/resources/payment_attempt_record.rb +73 -0
  97. data/lib/stripe/resources/payment_intent.rb +642 -0
  98. data/lib/stripe/resources/payment_link.rb +198 -0
  99. data/lib/stripe/resources/payment_method.rb +368 -0
  100. data/lib/stripe/resources/payment_method_configuration.rb +430 -0
  101. data/lib/stripe/resources/payment_method_domain.rb +57 -0
  102. data/lib/stripe/resources/payment_record.rb +79 -0
  103. data/lib/stripe/resources/payout.rb +56 -0
  104. data/lib/stripe/resources/person.rb +128 -0
  105. data/lib/stripe/resources/plan.rb +52 -0
  106. data/lib/stripe/resources/price.rb +77 -0
  107. data/lib/stripe/resources/product.rb +60 -0
  108. data/lib/stripe/resources/product_feature.rb +12 -0
  109. data/lib/stripe/resources/promotion_code.rb +35 -0
  110. data/lib/stripe/resources/quote.rb +252 -0
  111. data/lib/stripe/resources/quote_line.rb +136 -0
  112. data/lib/stripe/resources/quote_preview_invoice.rb +331 -0
  113. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +159 -0
  114. data/lib/stripe/resources/radar/early_fraud_warning.rb +17 -0
  115. data/lib/stripe/resources/radar/value_list.rb +23 -0
  116. data/lib/stripe/resources/radar/value_list_item.rb +17 -0
  117. data/lib/stripe/resources/refund.rb +130 -0
  118. data/lib/stripe/resources/reporting/report_run.rb +29 -0
  119. data/lib/stripe/resources/reporting/report_type.rb +19 -0
  120. data/lib/stripe/resources/reserve_transaction.rb +22 -0
  121. data/lib/stripe/resources/reversal.rb +21 -0
  122. data/lib/stripe/resources/review.rb +36 -0
  123. data/lib/stripe/resources/setup_attempt.rb +101 -0
  124. data/lib/stripe/resources/setup_intent.rb +158 -0
  125. data/lib/stripe/resources/shipping_rate.rb +42 -0
  126. data/lib/stripe/resources/sigma/scheduled_query_run.rb +26 -0
  127. data/lib/stripe/resources/source.rb +195 -0
  128. data/lib/stripe/resources/source_mandate_notification.rb +59 -0
  129. data/lib/stripe/resources/source_transaction.rb +48 -0
  130. data/lib/stripe/resources/subscription.rb +214 -0
  131. data/lib/stripe/resources/subscription_item.rb +46 -0
  132. data/lib/stripe/resources/subscription_schedule.rb +153 -0
  133. data/lib/stripe/resources/tax/association.rb +36 -0
  134. data/lib/stripe/resources/tax/calculation.rb +72 -0
  135. data/lib/stripe/resources/tax/calculation_line_item.rb +33 -0
  136. data/lib/stripe/resources/tax/form.rb +75 -0
  137. data/lib/stripe/resources/tax/registration.rb +379 -0
  138. data/lib/stripe/resources/tax/settings.rb +33 -0
  139. data/lib/stripe/resources/tax/transaction.rb +68 -0
  140. data/lib/stripe/resources/tax/transaction_line_item.rb +30 -0
  141. data/lib/stripe/resources/tax_code.rb +9 -0
  142. data/lib/stripe/resources/tax_deducted_at_source.rb +22 -0
  143. data/lib/stripe/resources/tax_id.rb +30 -0
  144. data/lib/stripe/resources/tax_rate.rb +42 -0
  145. data/lib/stripe/resources/terminal/configuration.rb +107 -0
  146. data/lib/stripe/resources/terminal/connection_token.rb +7 -0
  147. data/lib/stripe/resources/terminal/location.rb +20 -0
  148. data/lib/stripe/resources/terminal/reader.rb +118 -0
  149. data/lib/stripe/resources/terminal/reader_collected_data.rb +16 -0
  150. data/lib/stripe/resources/test_helpers/test_clock.rb +27 -0
  151. data/lib/stripe/resources/token.rb +29 -0
  152. data/lib/stripe/resources/topup.rb +33 -0
  153. data/lib/stripe/resources/transfer.rb +35 -0
  154. data/lib/stripe/resources/treasury/credit_reversal.rb +32 -0
  155. data/lib/stripe/resources/treasury/debit_reversal.rb +38 -0
  156. data/lib/stripe/resources/treasury/financial_account.rb +57 -0
  157. data/lib/stripe/resources/treasury/financial_account_features.rb +91 -0
  158. data/lib/stripe/resources/treasury/inbound_transfer.rb +66 -0
  159. data/lib/stripe/resources/treasury/outbound_payment.rb +85 -0
  160. data/lib/stripe/resources/treasury/outbound_transfer.rb +82 -0
  161. data/lib/stripe/resources/treasury/received_credit.rb +70 -0
  162. data/lib/stripe/resources/treasury/received_debit.rb +67 -0
  163. data/lib/stripe/resources/treasury/transaction.rb +42 -0
  164. data/lib/stripe/resources/treasury/transaction_entry.rb +34 -0
  165. data/lib/stripe/resources/usage_record.rb +13 -0
  166. data/lib/stripe/resources/usage_record_summary.rb +18 -0
  167. data/lib/stripe/resources/v2/amount.rb +9 -0
  168. data/lib/stripe/resources/v2/billing/meter_event.rb +18 -0
  169. data/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +20 -0
  170. data/lib/stripe/resources/v2/billing/meter_event_session.rb +14 -0
  171. data/lib/stripe/resources/v2/event.rb +21 -0
  172. data/lib/stripe/resources/v2/event_destination.rb +49 -0
  173. data/lib/stripe/resources/webhook_endpoint.rb +27 -0
  174. data/lib/stripe/resources.rb +10 -0
  175. data/lib/stripe/services/billing/credit_balance_summary_service.rb +1 -1
  176. data/lib/stripe/services/billing/credit_balance_transaction_service.rb +2 -2
  177. data/lib/stripe/services/billing/credit_grant_service.rb +3 -3
  178. data/lib/stripe/services/billing/meter_event_adjustment_service.rb +1 -1
  179. data/lib/stripe/services/billing/meter_event_service.rb +1 -1
  180. data/lib/stripe/services/billing/meter_service.rb +5 -5
  181. data/lib/stripe/stripe_object.rb +5 -0
  182. data/lib/stripe/version.rb +1 -1
  183. data/stripe.gemspec +2 -1
  184. metadata +13 -2
@@ -17,6 +17,29 @@ module Stripe
17
17
  "radar.value_list"
18
18
  end
19
19
 
20
+ # The name of the value list for use in rules.
21
+ attr_reader :alias
22
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
23
+ attr_reader :created
24
+ # The name or email address of the user who created this value list.
25
+ attr_reader :created_by
26
+ # Unique identifier for the object.
27
+ attr_reader :id
28
+ # The type of items in the value list. One of `card_fingerprint`, `us_bank_account_fingerprint`, `sepa_debit_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`.
29
+ attr_reader :item_type
30
+ # List of items contained within this value list.
31
+ attr_reader :list_items
32
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
33
+ attr_reader :livemode
34
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
35
+ attr_reader :metadata
36
+ # The name of the value list.
37
+ attr_reader :name
38
+ # String representing the object's type. Objects of the same type share the same value.
39
+ attr_reader :object
40
+ # Always true for a deleted object
41
+ attr_reader :deleted
42
+
20
43
  # Creates a new ValueList object, which can then be referenced in rules.
21
44
  def self.create(params = {}, opts = {})
22
45
  request_stripe_object(
@@ -16,6 +16,23 @@ module Stripe
16
16
  "radar.value_list_item"
17
17
  end
18
18
 
19
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
20
+ attr_reader :created
21
+ # The name or email address of the user who added this item to the value list.
22
+ attr_reader :created_by
23
+ # Unique identifier for the object.
24
+ attr_reader :id
25
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
26
+ attr_reader :livemode
27
+ # String representing the object's type. Objects of the same type share the same value.
28
+ attr_reader :object
29
+ # The value of the item.
30
+ attr_reader :value
31
+ # The identifier of the value list this item belongs to.
32
+ attr_reader :value_list
33
+ # Always true for a deleted object
34
+ attr_reader :deleted
35
+
19
36
  # Creates a new ValueListItem object, which is added to the specified parent value list.
20
37
  def self.create(params = {}, opts = {})
21
38
  request_stripe_object(
@@ -17,6 +17,136 @@ module Stripe
17
17
  "refund"
18
18
  end
19
19
 
20
+ class DestinationDetails < Stripe::StripeObject
21
+ class Affirm < Stripe::StripeObject; end
22
+ class AfterpayClearpay < Stripe::StripeObject; end
23
+ class Alipay < Stripe::StripeObject; end
24
+ class Alma < Stripe::StripeObject; end
25
+ class AmazonPay < Stripe::StripeObject; end
26
+ class AuBankTransfer < Stripe::StripeObject; end
27
+
28
+ class Blik < Stripe::StripeObject
29
+ attr_reader :network_decline_code, :reference, :reference_status
30
+ end
31
+
32
+ class BrBankTransfer < Stripe::StripeObject
33
+ attr_reader :reference, :reference_status
34
+ end
35
+
36
+ class Card < Stripe::StripeObject
37
+ attr_reader :reference, :reference_status, :reference_type, :type
38
+ end
39
+
40
+ class Cashapp < Stripe::StripeObject; end
41
+ class CustomerCashBalance < Stripe::StripeObject; end
42
+ class Eps < Stripe::StripeObject; end
43
+
44
+ class EuBankTransfer < Stripe::StripeObject
45
+ attr_reader :reference, :reference_status
46
+ end
47
+
48
+ class GbBankTransfer < Stripe::StripeObject
49
+ attr_reader :reference, :reference_status
50
+ end
51
+
52
+ class Giropay < Stripe::StripeObject; end
53
+ class Grabpay < Stripe::StripeObject; end
54
+
55
+ class IdBankTransfer < Stripe::StripeObject
56
+ attr_reader :reference, :reference_status
57
+ end
58
+
59
+ class JpBankTransfer < Stripe::StripeObject
60
+ attr_reader :reference, :reference_status
61
+ end
62
+
63
+ class Klarna < Stripe::StripeObject; end
64
+
65
+ class Multibanco < Stripe::StripeObject
66
+ attr_reader :reference, :reference_status
67
+ end
68
+
69
+ class MxBankTransfer < Stripe::StripeObject
70
+ attr_reader :reference, :reference_status
71
+ end
72
+
73
+ class P24 < Stripe::StripeObject
74
+ attr_reader :reference, :reference_status
75
+ end
76
+
77
+ class Paynow < Stripe::StripeObject; end
78
+ class Paypal < Stripe::StripeObject; end
79
+ class Pix < Stripe::StripeObject; end
80
+ class Revolut < Stripe::StripeObject; end
81
+ class Sofort < Stripe::StripeObject; end
82
+
83
+ class Swish < Stripe::StripeObject
84
+ attr_reader :network_decline_code, :reference, :reference_status
85
+ end
86
+
87
+ class ThBankTransfer < Stripe::StripeObject
88
+ attr_reader :reference, :reference_status
89
+ end
90
+
91
+ class UsBankTransfer < Stripe::StripeObject
92
+ attr_reader :reference, :reference_status
93
+ end
94
+
95
+ class WechatPay < Stripe::StripeObject; end
96
+ class Zip < Stripe::StripeObject; end
97
+ attr_reader :affirm, :afterpay_clearpay, :alipay, :alma, :amazon_pay, :au_bank_transfer, :blik, :br_bank_transfer, :card, :cashapp, :customer_cash_balance, :eps, :eu_bank_transfer, :gb_bank_transfer, :giropay, :grabpay, :id_bank_transfer, :jp_bank_transfer, :klarna, :multibanco, :mx_bank_transfer, :p24, :paynow, :paypal, :pix, :revolut, :sofort, :swish, :th_bank_transfer, :type, :us_bank_transfer, :wechat_pay, :zip
98
+ end
99
+
100
+ class NextAction < Stripe::StripeObject
101
+ class DisplayDetails < Stripe::StripeObject
102
+ class EmailSent < Stripe::StripeObject
103
+ attr_reader :email_sent_at, :email_sent_to
104
+ end
105
+ attr_reader :email_sent, :expires_at
106
+ end
107
+ attr_reader :display_details, :type
108
+ end
109
+ # Amount, in cents (or local equivalent).
110
+ attr_reader :amount
111
+ # Balance transaction that describes the impact on your account balance.
112
+ attr_reader :balance_transaction
113
+ # ID of the charge that's refunded.
114
+ attr_reader :charge
115
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
116
+ attr_reader :created
117
+ # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
118
+ attr_reader :currency
119
+ # An arbitrary string attached to the object. You can use this for displaying to users (available on non-card refunds only).
120
+ attr_reader :description
121
+ # Attribute for field destination_details
122
+ attr_reader :destination_details
123
+ # After the refund fails, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction.
124
+ attr_reader :failure_balance_transaction
125
+ # Provides the reason for the refund failure. Possible values are: `lost_or_stolen_card`, `expired_or_canceled_card`, `charge_for_pending_refund_disputed`, `insufficient_funds`, `declined`, `merchant_request`, or `unknown`.
126
+ attr_reader :failure_reason
127
+ # Unique identifier for the object.
128
+ attr_reader :id
129
+ # For payment methods without native refund support (for example, Konbini, PromptPay), provide an email address for the customer to receive refund instructions.
130
+ attr_reader :instructions_email
131
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
132
+ attr_reader :metadata
133
+ # Attribute for field next_action
134
+ attr_reader :next_action
135
+ # String representing the object's type. Objects of the same type share the same value.
136
+ attr_reader :object
137
+ # ID of the PaymentIntent that's refunded.
138
+ attr_reader :payment_intent
139
+ # Reason for the refund, which is either user-provided (`duplicate`, `fraudulent`, or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`).
140
+ attr_reader :reason
141
+ # This is the transaction number that appears on email receipts sent for this refund.
142
+ attr_reader :receipt_number
143
+ # The transfer reversal that's associated with the refund. Only present if the charge came from another Stripe account.
144
+ attr_reader :source_transfer_reversal
145
+ # Status of the refund. This can be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. Learn more about [failed refunds](https://stripe.com/docs/refunds#failed-refunds).
146
+ attr_reader :status
147
+ # This refers to the transfer reversal object if the accompanying transfer reverses. This is only applicable if the charge was created using the destination parameter.
148
+ attr_reader :transfer_reversal
149
+
20
150
  # Cancels a refund with a status of requires_action.
21
151
  #
22
152
  # You can't cancel refunds in other states. Only refunds for payment methods that require customer action can enter the requires_action state.
@@ -20,6 +20,35 @@ module Stripe
20
20
  "reporting.report_run"
21
21
  end
22
22
 
23
+ class Parameters < Stripe::StripeObject
24
+ attr_reader :columns, :connected_account, :currency, :interval_end, :interval_start, :payout, :reporting_category, :timezone
25
+ end
26
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
27
+ attr_reader :created
28
+ # If something should go wrong during the run, a message about the failure (populated when
29
+ # `status=failed`).
30
+ attr_reader :error
31
+ # Unique identifier for the object.
32
+ attr_reader :id
33
+ # `true` if the report is run on live mode data and `false` if it is run on test mode data.
34
+ attr_reader :livemode
35
+ # String representing the object's type. Objects of the same type share the same value.
36
+ attr_reader :object
37
+ # Attribute for field parameters
38
+ attr_reader :parameters
39
+ # The ID of the [report type](https://stripe.com/docs/reports/report-types) to run, such as `"balance.summary.1"`.
40
+ attr_reader :report_type
41
+ # The file object representing the result of the report run (populated when
42
+ # `status=succeeded`).
43
+ attr_reader :result
44
+ # Status of this report run. This will be `pending` when the run is initially created.
45
+ # When the run finishes, this will be set to `succeeded` and the `result` field will be populated.
46
+ # Rarely, we may encounter an error, at which point this will be set to `failed` and the `error` field will be populated.
47
+ attr_reader :status
48
+ # Timestamp at which this run successfully finished (populated when
49
+ # `status=succeeded`). Measured in seconds since the Unix epoch.
50
+ attr_reader :succeeded_at
51
+
23
52
  # Creates a new object and begin running the report. (Certain report types require a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).)
24
53
  def self.create(params = {}, opts = {})
25
54
  request_stripe_object(
@@ -19,6 +19,25 @@ module Stripe
19
19
  "reporting.report_type"
20
20
  end
21
21
 
22
+ # Most recent time for which this Report Type is available. Measured in seconds since the Unix epoch.
23
+ attr_reader :data_available_end
24
+ # Earliest time for which this Report Type is available. Measured in seconds since the Unix epoch.
25
+ attr_reader :data_available_start
26
+ # List of column names that are included by default when this Report Type gets run. (If the Report Type doesn't support the `columns` parameter, this will be null.)
27
+ attr_reader :default_columns
28
+ # The [ID of the Report Type](https://stripe.com/docs/reporting/statements/api#available-report-types), such as `balance.summary.1`.
29
+ attr_reader :id
30
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
31
+ attr_reader :livemode
32
+ # Human-readable name of the Report Type
33
+ attr_reader :name
34
+ # String representing the object's type. Objects of the same type share the same value.
35
+ attr_reader :object
36
+ # When this Report Type was latest updated. Measured in seconds since the Unix epoch.
37
+ attr_reader :updated
38
+ # Version of the Report Type. Different versions report with the same ID will have the same purpose, but may take different run parameters or have different result schemas.
39
+ attr_reader :version
40
+
22
41
  # Returns a full list of Report Types.
23
42
  def self.list(filters = {}, opts = {})
24
43
  request_stripe_object(
@@ -0,0 +1,22 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ class ReserveTransaction < APIResource
6
+ OBJECT_NAME = "reserve_transaction"
7
+ def self.object_name
8
+ "reserve_transaction"
9
+ end
10
+
11
+ # Attribute for field amount
12
+ attr_reader :amount
13
+ # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
14
+ attr_reader :currency
15
+ # An arbitrary string attached to the object. Often useful for displaying to users.
16
+ attr_reader :description
17
+ # Unique identifier for the object.
18
+ attr_reader :id
19
+ # String representing the object's type. Objects of the same type share the same value.
20
+ attr_reader :object
21
+ end
22
+ end
@@ -23,6 +23,27 @@ module Stripe
23
23
  "transfer_reversal"
24
24
  end
25
25
 
26
+ # Amount, in cents (or local equivalent).
27
+ attr_reader :amount
28
+ # Balance transaction that describes the impact on your account balance.
29
+ attr_reader :balance_transaction
30
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
31
+ attr_reader :created
32
+ # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
33
+ attr_reader :currency
34
+ # Linked payment refund for the transfer reversal.
35
+ attr_reader :destination_payment_refund
36
+ # Unique identifier for the object.
37
+ attr_reader :id
38
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
39
+ attr_reader :metadata
40
+ # String representing the object's type. Objects of the same type share the same value.
41
+ attr_reader :object
42
+ # ID of the refund responsible for the transfer reversal.
43
+ attr_reader :source_refund
44
+ # ID of the transfer that was reversed.
45
+ attr_reader :transfer
46
+
26
47
  def resource_url
27
48
  "#{Transfer.resource_url}/#{CGI.escape(transfer)}/reversals" \
28
49
  "/#{CGI.escape(id)}"
@@ -14,6 +14,42 @@ module Stripe
14
14
  "review"
15
15
  end
16
16
 
17
+ class IpAddressLocation < Stripe::StripeObject
18
+ attr_reader :city, :country, :latitude, :longitude, :region
19
+ end
20
+
21
+ class Session < Stripe::StripeObject
22
+ attr_reader :browser, :device, :platform, :version
23
+ end
24
+ # The ZIP or postal code of the card used, if applicable.
25
+ attr_reader :billing_zip
26
+ # The charge associated with this review.
27
+ attr_reader :charge
28
+ # The reason the review was closed, or null if it has not yet been closed. One of `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`.
29
+ attr_reader :closed_reason
30
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
31
+ attr_reader :created
32
+ # Unique identifier for the object.
33
+ attr_reader :id
34
+ # The IP address where the payment originated.
35
+ attr_reader :ip_address
36
+ # Information related to the location of the payment. Note that this information is an approximation and attempts to locate the nearest population center - it should not be used to determine a specific address.
37
+ attr_reader :ip_address_location
38
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
39
+ attr_reader :livemode
40
+ # String representing the object's type. Objects of the same type share the same value.
41
+ attr_reader :object
42
+ # If `true`, the review needs action.
43
+ attr_reader :open
44
+ # The reason the review was opened. One of `rule` or `manual`.
45
+ attr_reader :opened_reason
46
+ # The PaymentIntent ID associated with this review, if one exists.
47
+ attr_reader :payment_intent
48
+ # The reason the review is currently open or closed. One of `rule`, `manual`, `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`.
49
+ attr_reader :reason
50
+ # Information related to the browsing session of the user who initiated the payment.
51
+ attr_reader :session
52
+
17
53
  # Approves a Review object, closing it and removing it from the list of reviews.
18
54
  def approve(params = {}, opts = {})
19
55
  request_stripe_object(
@@ -14,6 +14,107 @@ module Stripe
14
14
  "setup_attempt"
15
15
  end
16
16
 
17
+ class PaymentMethodDetails < Stripe::StripeObject
18
+ class AcssDebit < Stripe::StripeObject; end
19
+ class AmazonPay < Stripe::StripeObject; end
20
+ class AuBecsDebit < Stripe::StripeObject; end
21
+ class BacsDebit < Stripe::StripeObject; end
22
+
23
+ class Bancontact < Stripe::StripeObject
24
+ attr_reader :bank_code, :bank_name, :bic, :generated_sepa_debit, :generated_sepa_debit_mandate, :iban_last4, :preferred_language, :verified_name
25
+ end
26
+
27
+ class Boleto < Stripe::StripeObject; end
28
+
29
+ class Card < Stripe::StripeObject
30
+ class Checks < Stripe::StripeObject
31
+ attr_reader :address_line1_check, :address_postal_code_check, :cvc_check
32
+ end
33
+
34
+ class ThreeDSecure < Stripe::StripeObject
35
+ attr_reader :authentication_flow, :electronic_commerce_indicator, :result, :result_reason, :transaction_id, :version
36
+ end
37
+
38
+ class Wallet < Stripe::StripeObject
39
+ class ApplePay < Stripe::StripeObject; end
40
+ class GooglePay < Stripe::StripeObject; end
41
+ attr_reader :apple_pay, :google_pay, :type
42
+ end
43
+ attr_reader :brand, :checks, :country, :description, :exp_month, :exp_year, :fingerprint, :funding, :iin, :issuer, :last4, :network, :three_d_secure, :wallet
44
+ end
45
+
46
+ class CardPresent < Stripe::StripeObject
47
+ class Offline < Stripe::StripeObject
48
+ attr_reader :stored_at, :type
49
+ end
50
+ attr_reader :generated_card, :offline
51
+ end
52
+
53
+ class Cashapp < Stripe::StripeObject; end
54
+
55
+ class IdBankTransfer < Stripe::StripeObject
56
+ attr_reader :bank, :bank_code, :bank_name, :display_name
57
+ end
58
+
59
+ class Ideal < Stripe::StripeObject
60
+ attr_reader :bank, :bic, :generated_sepa_debit, :generated_sepa_debit_mandate, :iban_last4, :verified_name
61
+ end
62
+
63
+ class KakaoPay < Stripe::StripeObject; end
64
+ class Klarna < Stripe::StripeObject; end
65
+ class KrCard < Stripe::StripeObject; end
66
+ class Link < Stripe::StripeObject; end
67
+ class Paypal < Stripe::StripeObject; end
68
+ class Payto < Stripe::StripeObject; end
69
+ class RevolutPay < Stripe::StripeObject; end
70
+ class SepaDebit < Stripe::StripeObject; end
71
+
72
+ class Sofort < Stripe::StripeObject
73
+ attr_reader :bank_code, :bank_name, :bic, :generated_sepa_debit, :generated_sepa_debit_mandate, :iban_last4, :preferred_language, :verified_name
74
+ end
75
+
76
+ class UsBankAccount < Stripe::StripeObject; end
77
+ attr_reader :acss_debit, :amazon_pay, :au_becs_debit, :bacs_debit, :bancontact, :boleto, :card, :card_present, :cashapp, :id_bank_transfer, :ideal, :kakao_pay, :klarna, :kr_card, :link, :paypal, :payto, :revolut_pay, :sepa_debit, :sofort, :type, :us_bank_account
78
+ end
79
+
80
+ class SetupError < Stripe::StripeObject
81
+ attr_reader :charge, :code, :decline_code, :doc_url, :message, :network_advice_code, :network_decline_code, :param, :payment_intent, :payment_method, :payment_method_type, :request_log_url, :setup_intent, :source, :type
82
+ end
83
+ # The value of [application](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-application) on the SetupIntent at the time of this confirmation.
84
+ attr_reader :application
85
+ # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
86
+ #
87
+ # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
88
+ attr_reader :attach_to_self
89
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
90
+ attr_reader :created
91
+ # The value of [customer](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-customer) on the SetupIntent at the time of this confirmation.
92
+ attr_reader :customer
93
+ # Indicates the directions of money movement for which this payment method is intended to be used.
94
+ #
95
+ # Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.
96
+ attr_reader :flow_directions
97
+ # Unique identifier for the object.
98
+ attr_reader :id
99
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
100
+ attr_reader :livemode
101
+ # String representing the object's type. Objects of the same type share the same value.
102
+ attr_reader :object
103
+ # The value of [on_behalf_of](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-on_behalf_of) on the SetupIntent at the time of this confirmation.
104
+ attr_reader :on_behalf_of
105
+ # ID of the payment method used with this SetupAttempt.
106
+ attr_reader :payment_method
107
+ # Attribute for field payment_method_details
108
+ attr_reader :payment_method_details
109
+ # The error encountered during this attempt to confirm the SetupIntent, if any.
110
+ attr_reader :setup_error
111
+ # ID of the SetupIntent that this attempt belongs to.
112
+ attr_reader :setup_intent
113
+ # Status of this SetupAttempt, one of `requires_confirmation`, `requires_action`, `processing`, `succeeded`, `failed`, or `abandoned`.
114
+ attr_reader :status
115
+ # The value of [usage](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-usage) on the SetupIntent at the time of this confirmation, one of `off_session` or `on_session`.
116
+ attr_reader :usage
117
+
17
118
  # Returns a list of SetupAttempts that associate with a provided SetupIntent.
18
119
  def self.list(filters = {}, opts = {})
19
120
  request_stripe_object(method: :get, path: "/v1/setup_attempts", params: filters, opts: opts)
@@ -33,6 +33,164 @@ module Stripe
33
33
  "setup_intent"
34
34
  end
35
35
 
36
+ class AutomaticPaymentMethods < Stripe::StripeObject
37
+ attr_reader :allow_redirects, :enabled
38
+ end
39
+
40
+ class LastSetupError < Stripe::StripeObject
41
+ attr_reader :charge, :code, :decline_code, :doc_url, :message, :network_advice_code, :network_decline_code, :param, :payment_intent, :payment_method, :payment_method_type, :request_log_url, :setup_intent, :source, :type
42
+ end
43
+
44
+ class NextAction < Stripe::StripeObject
45
+ class CashappHandleRedirectOrDisplayQrCode < Stripe::StripeObject
46
+ class QrCode < Stripe::StripeObject
47
+ attr_reader :expires_at, :image_url_png, :image_url_svg
48
+ end
49
+ attr_reader :hosted_instructions_url, :mobile_auth_url, :qr_code
50
+ end
51
+
52
+ class RedirectToUrl < Stripe::StripeObject
53
+ attr_reader :return_url, :url
54
+ end
55
+
56
+ class VerifyWithMicrodeposits < Stripe::StripeObject
57
+ attr_reader :arrival_date, :hosted_verification_url, :microdeposit_type
58
+ end
59
+ attr_reader :cashapp_handle_redirect_or_display_qr_code, :redirect_to_url, :type, :use_stripe_sdk, :verify_with_microdeposits
60
+ end
61
+
62
+ class PaymentMethodConfigurationDetails < Stripe::StripeObject
63
+ attr_reader :id, :parent
64
+ end
65
+
66
+ class PaymentMethodOptions < Stripe::StripeObject
67
+ class AcssDebit < Stripe::StripeObject
68
+ class MandateOptions < Stripe::StripeObject
69
+ attr_reader :custom_mandate_url, :default_for, :interval_description, :payment_schedule, :transaction_type
70
+ end
71
+ attr_reader :currency, :mandate_options, :verification_method
72
+ end
73
+
74
+ class AmazonPay < Stripe::StripeObject; end
75
+
76
+ class BacsDebit < Stripe::StripeObject
77
+ class MandateOptions < Stripe::StripeObject
78
+ attr_reader :reference_prefix
79
+ end
80
+ attr_reader :mandate_options
81
+ end
82
+
83
+ class Card < Stripe::StripeObject
84
+ class MandateOptions < Stripe::StripeObject
85
+ attr_reader :amount, :amount_type, :currency, :description, :end_date, :interval, :interval_count, :reference, :start_date, :supported_types
86
+ end
87
+ attr_reader :mandate_options, :network, :request_three_d_secure
88
+ end
89
+
90
+ class CardPresent < Stripe::StripeObject; end
91
+
92
+ class Link < Stripe::StripeObject
93
+ attr_reader :persistent_token
94
+ end
95
+
96
+ class Paypal < Stripe::StripeObject
97
+ attr_reader :billing_agreement_id, :currency, :subsellers
98
+ end
99
+
100
+ class Payto < Stripe::StripeObject
101
+ class MandateOptions < Stripe::StripeObject
102
+ attr_reader :amount, :amount_type, :end_date, :payment_schedule, :payments_per_period, :purpose, :start_date
103
+ end
104
+ attr_reader :mandate_options
105
+ end
106
+
107
+ class SepaDebit < Stripe::StripeObject
108
+ class MandateOptions < Stripe::StripeObject
109
+ attr_reader :reference_prefix
110
+ end
111
+ attr_reader :mandate_options
112
+ end
113
+
114
+ class UsBankAccount < Stripe::StripeObject
115
+ class FinancialConnections < Stripe::StripeObject
116
+ class Filters < Stripe::StripeObject
117
+ attr_reader :account_subcategories, :institution
118
+ end
119
+
120
+ class ManualEntry < Stripe::StripeObject
121
+ attr_reader :mode
122
+ end
123
+ attr_reader :filters, :manual_entry, :permissions, :prefetch, :return_url
124
+ end
125
+
126
+ class MandateOptions < Stripe::StripeObject
127
+ attr_reader :collection_method
128
+ end
129
+ attr_reader :financial_connections, :mandate_options, :verification_method
130
+ end
131
+ attr_reader :acss_debit, :amazon_pay, :bacs_debit, :card, :card_present, :link, :paypal, :payto, :sepa_debit, :us_bank_account
132
+ end
133
+ # ID of the Connect application that created the SetupIntent.
134
+ attr_reader :application
135
+ # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
136
+ #
137
+ # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
138
+ attr_reader :attach_to_self
139
+ # Settings for dynamic payment methods compatible with this Setup Intent
140
+ attr_reader :automatic_payment_methods
141
+ # Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`.
142
+ attr_reader :cancellation_reason
143
+ # The client secret of this SetupIntent. Used for client-side retrieval using a publishable key.
144
+ #
145
+ # The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.
146
+ attr_reader :client_secret
147
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
148
+ attr_reader :created
149
+ # ID of the Customer this SetupIntent belongs to, if one exists.
150
+ #
151
+ # If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent.
152
+ attr_reader :customer
153
+ # An arbitrary string attached to the object. Often useful for displaying to users.
154
+ attr_reader :description
155
+ # Indicates the directions of money movement for which this payment method is intended to be used.
156
+ #
157
+ # Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.
158
+ attr_reader :flow_directions
159
+ # Unique identifier for the object.
160
+ attr_reader :id
161
+ # The error encountered in the previous SetupIntent confirmation.
162
+ attr_reader :last_setup_error
163
+ # The most recent SetupAttempt for this SetupIntent.
164
+ attr_reader :latest_attempt
165
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
166
+ attr_reader :livemode
167
+ # ID of the multi use Mandate generated by the SetupIntent.
168
+ attr_reader :mandate
169
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
170
+ attr_reader :metadata
171
+ # If present, this property tells you what actions you need to take in order for your customer to continue payment setup.
172
+ attr_reader :next_action
173
+ # String representing the object's type. Objects of the same type share the same value.
174
+ attr_reader :object
175
+ # The account (if any) for which the setup is intended.
176
+ attr_reader :on_behalf_of
177
+ # ID of the payment method used with this SetupIntent. If the payment method is `card_present` and isn't a digital wallet, then the [generated_card](https://docs.stripe.com/api/setup_attempts/object#setup_attempt_object-payment_method_details-card_present-generated_card) associated with the `latest_attempt` is attached to the Customer instead.
178
+ attr_reader :payment_method
179
+ # Information about the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) used for this Setup Intent.
180
+ attr_reader :payment_method_configuration_details
181
+ # Payment method-specific configuration for this SetupIntent.
182
+ attr_reader :payment_method_options
183
+ # The list of payment method types (e.g. card) that this SetupIntent is allowed to set up.
184
+ attr_reader :payment_method_types
185
+ # ID of the single_use Mandate generated by the SetupIntent.
186
+ attr_reader :single_use_mandate
187
+ # [Status](https://stripe.com/docs/payments/intents#intent-statuses) of this SetupIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `canceled`, or `succeeded`.
188
+ attr_reader :status
189
+ # Indicates how the payment method is intended to be used in the future.
190
+ #
191
+ # Use `on_session` if you intend to only reuse the payment method when the customer is in your checkout flow. Use `off_session` if your customer may or may not be in your checkout flow. If not provided, this value defaults to `off_session`.
192
+ attr_reader :usage
193
+
36
194
  # You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action.
37
195
  #
38
196
  # After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. You can't cancel the SetupIntent for a Checkout Session. [Expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead.