stripe 13.3.0.pre.beta.3 → 13.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (220) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +650 -1402
  3. data/OPENAPI_VERSION +1 -1
  4. data/VERSION +1 -1
  5. data/lib/stripe/object_types.rb +0 -32
  6. data/lib/stripe/resources/account.rb +2 -232
  7. data/lib/stripe/resources/account_link.rb +0 -9
  8. data/lib/stripe/resources/account_session.rb +0 -103
  9. data/lib/stripe/resources/apple_pay_domain.rb +2 -20
  10. data/lib/stripe/resources/application_fee.rb +2 -36
  11. data/lib/stripe/resources/application_fee_refund.rb +0 -17
  12. data/lib/stripe/resources/apps/secret.rb +2 -24
  13. data/lib/stripe/resources/balance.rb +0 -59
  14. data/lib/stripe/resources/balance_transaction.rb +2 -36
  15. data/lib/stripe/resources/bank_account.rb +3 -61
  16. data/lib/stripe/resources/billing/alert.rb +2 -23
  17. data/lib/stripe/resources/billing/credit_balance_summary.rb +0 -25
  18. data/lib/stripe/resources/billing/credit_balance_transaction.rb +2 -50
  19. data/lib/stripe/resources/billing/credit_grant.rb +2 -46
  20. data/lib/stripe/resources/billing/meter.rb +2 -44
  21. data/lib/stripe/resources/billing/meter_event.rb +0 -15
  22. data/lib/stripe/resources/billing/meter_event_adjustment.rb +0 -16
  23. data/lib/stripe/resources/billing/meter_event_summary.rb +0 -15
  24. data/lib/stripe/resources/billing_portal/configuration.rb +2 -72
  25. data/lib/stripe/resources/billing_portal/session.rb +0 -61
  26. data/lib/stripe/resources/capability.rb +0 -38
  27. data/lib/stripe/resources/card.rb +1 -77
  28. data/lib/stripe/resources/cash_balance.rb +0 -14
  29. data/lib/stripe/resources/charge.rb +2 -471
  30. data/lib/stripe/resources/checkout/session.rb +2 -498
  31. data/lib/stripe/resources/climate/order.rb +2 -57
  32. data/lib/stripe/resources/climate/product.rb +2 -26
  33. data/lib/stripe/resources/climate/supplier.rb +2 -20
  34. data/lib/stripe/resources/confirmation_token.rb +0 -297
  35. data/lib/stripe/resources/country_spec.rb +2 -29
  36. data/lib/stripe/resources/coupon.rb +2 -46
  37. data/lib/stripe/resources/credit_note.rb +2 -93
  38. data/lib/stripe/resources/credit_note_line_item.rb +0 -46
  39. data/lib/stripe/resources/customer.rb +2 -95
  40. data/lib/stripe/resources/customer_balance_transaction.rb +0 -27
  41. data/lib/stripe/resources/customer_cash_balance_transaction.rb +0 -72
  42. data/lib/stripe/resources/customer_session.rb +0 -34
  43. data/lib/stripe/resources/discount.rb +0 -29
  44. data/lib/stripe/resources/dispute.rb +2 -98
  45. data/lib/stripe/resources/entitlements/active_entitlement.rb +2 -13
  46. data/lib/stripe/resources/entitlements/feature.rb +2 -17
  47. data/lib/stripe/resources/ephemeral_key.rb +0 -13
  48. data/lib/stripe/resources/event.rb +2 -46
  49. data/lib/stripe/resources/exchange_rate.rb +2 -9
  50. data/lib/stripe/resources/file.rb +2 -25
  51. data/lib/stripe/resources/file_link.rb +2 -21
  52. data/lib/stripe/resources/financial_connections/account.rb +2 -89
  53. data/lib/stripe/resources/financial_connections/account_owner.rb +0 -17
  54. data/lib/stripe/resources/financial_connections/account_ownership.rb +0 -9
  55. data/lib/stripe/resources/financial_connections/session.rb +0 -49
  56. data/lib/stripe/resources/financial_connections/transaction.rb +2 -30
  57. data/lib/stripe/resources/forwarding/request.rb +2 -42
  58. data/lib/stripe/resources/funding_instructions.rb +0 -82
  59. data/lib/stripe/resources/identity/verification_report.rb +2 -94
  60. data/lib/stripe/resources/identity/verification_session.rb +2 -78
  61. data/lib/stripe/resources/invoice.rb +2 -420
  62. data/lib/stripe/resources/invoice_item.rb +2 -56
  63. data/lib/stripe/resources/invoice_line_item.rb +0 -83
  64. data/lib/stripe/resources/invoice_rendering_template.rb +2 -19
  65. data/lib/stripe/resources/issuing/authorization.rb +2 -131
  66. data/lib/stripe/resources/issuing/card.rb +2 -88
  67. data/lib/stripe/resources/issuing/cardholder.rb +2 -78
  68. data/lib/stripe/resources/issuing/dispute.rb +2 -67
  69. data/lib/stripe/resources/issuing/personalization_design.rb +2 -40
  70. data/lib/stripe/resources/issuing/physical_bundle.rb +2 -20
  71. data/lib/stripe/resources/issuing/token.rb +2 -48
  72. data/lib/stripe/resources/issuing/transaction.rb +2 -108
  73. data/lib/stripe/resources/line_item.rb +0 -50
  74. data/lib/stripe/resources/login_link.rb +0 -7
  75. data/lib/stripe/resources/mandate.rb +0 -78
  76. data/lib/stripe/resources/payment_intent.rb +2 -714
  77. data/lib/stripe/resources/payment_link.rb +2 -200
  78. data/lib/stripe/resources/payment_method.rb +2 -370
  79. data/lib/stripe/resources/payment_method_configuration.rb +2 -432
  80. data/lib/stripe/resources/payment_method_domain.rb +2 -59
  81. data/lib/stripe/resources/payout.rb +2 -58
  82. data/lib/stripe/resources/person.rb +0 -128
  83. data/lib/stripe/resources/plan.rb +2 -54
  84. data/lib/stripe/resources/price.rb +2 -79
  85. data/lib/stripe/resources/product.rb +2 -62
  86. data/lib/stripe/resources/product_feature.rb +0 -12
  87. data/lib/stripe/resources/promotion_code.rb +2 -37
  88. data/lib/stripe/resources/quote.rb +2 -358
  89. data/lib/stripe/resources/radar/early_fraud_warning.rb +2 -19
  90. data/lib/stripe/resources/radar/value_list.rb +2 -25
  91. data/lib/stripe/resources/radar/value_list_item.rb +2 -19
  92. data/lib/stripe/resources/refund.rb +2 -132
  93. data/lib/stripe/resources/reporting/report_run.rb +2 -31
  94. data/lib/stripe/resources/reporting/report_type.rb +2 -21
  95. data/lib/stripe/resources/reversal.rb +0 -21
  96. data/lib/stripe/resources/review.rb +2 -38
  97. data/lib/stripe/resources/setup_attempt.rb +2 -103
  98. data/lib/stripe/resources/setup_intent.rb +2 -160
  99. data/lib/stripe/resources/shipping_rate.rb +2 -44
  100. data/lib/stripe/resources/sigma/scheduled_query_run.rb +2 -28
  101. data/lib/stripe/resources/source.rb +0 -197
  102. data/lib/stripe/resources/source_transaction.rb +0 -48
  103. data/lib/stripe/resources/subscription.rb +2 -216
  104. data/lib/stripe/resources/subscription_item.rb +2 -48
  105. data/lib/stripe/resources/subscription_schedule.rb +2 -175
  106. data/lib/stripe/resources/tax/calculation.rb +0 -72
  107. data/lib/stripe/resources/tax/calculation_line_item.rb +0 -33
  108. data/lib/stripe/resources/tax/registration.rb +2 -381
  109. data/lib/stripe/resources/tax/settings.rb +0 -33
  110. data/lib/stripe/resources/tax/transaction.rb +0 -68
  111. data/lib/stripe/resources/tax/transaction_line_item.rb +0 -30
  112. data/lib/stripe/resources/tax_code.rb +2 -11
  113. data/lib/stripe/resources/tax_id.rb +2 -32
  114. data/lib/stripe/resources/tax_rate.rb +2 -44
  115. data/lib/stripe/resources/terminal/configuration.rb +2 -109
  116. data/lib/stripe/resources/terminal/connection_token.rb +0 -7
  117. data/lib/stripe/resources/terminal/location.rb +2 -22
  118. data/lib/stripe/resources/terminal/reader.rb +2 -180
  119. data/lib/stripe/resources/test_helpers/test_clock.rb +2 -29
  120. data/lib/stripe/resources/token.rb +0 -29
  121. data/lib/stripe/resources/topup.rb +2 -35
  122. data/lib/stripe/resources/transfer.rb +2 -37
  123. data/lib/stripe/resources/treasury/credit_reversal.rb +2 -34
  124. data/lib/stripe/resources/treasury/debit_reversal.rb +2 -40
  125. data/lib/stripe/resources/treasury/financial_account.rb +2 -59
  126. data/lib/stripe/resources/treasury/financial_account_features.rb +0 -91
  127. data/lib/stripe/resources/treasury/inbound_transfer.rb +2 -68
  128. data/lib/stripe/resources/treasury/outbound_payment.rb +2 -87
  129. data/lib/stripe/resources/treasury/outbound_transfer.rb +2 -84
  130. data/lib/stripe/resources/treasury/received_credit.rb +2 -72
  131. data/lib/stripe/resources/treasury/received_debit.rb +2 -69
  132. data/lib/stripe/resources/treasury/transaction.rb +2 -44
  133. data/lib/stripe/resources/treasury/transaction_entry.rb +2 -36
  134. data/lib/stripe/resources/usage_record.rb +0 -13
  135. data/lib/stripe/resources/usage_record_summary.rb +0 -18
  136. data/lib/stripe/resources/v2/billing/meter_event.rb +0 -18
  137. data/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +0 -20
  138. data/lib/stripe/resources/v2/billing/meter_event_session.rb +0 -14
  139. data/lib/stripe/resources/v2/event.rb +0 -21
  140. data/lib/stripe/resources/v2/event_destination.rb +0 -49
  141. data/lib/stripe/resources/webhook_endpoint.rb +2 -34
  142. data/lib/stripe/resources.rb +0 -31
  143. data/lib/stripe/services/financial_connections/account_service.rb +1 -3
  144. data/lib/stripe/services/financial_connections_service.rb +1 -2
  145. data/lib/stripe/services/invoice_service.rb +1 -44
  146. data/lib/stripe/services/issuing_service.rb +1 -5
  147. data/lib/stripe/services/payment_intent_service.rb +0 -37
  148. data/lib/stripe/services/quote_service.rb +1 -49
  149. data/lib/stripe/services/subscription_schedule_service.rb +0 -11
  150. data/lib/stripe/services/tax_service.rb +1 -3
  151. data/lib/stripe/services/terminal/reader_service.rb +0 -33
  152. data/lib/stripe/services/terminal_service.rb +1 -2
  153. data/lib/stripe/services/v1_services.rb +1 -8
  154. data/lib/stripe/services.rb +0 -25
  155. data/lib/stripe/stripe_client.rb +1 -1
  156. data/lib/stripe/stripe_configuration.rb +1 -3
  157. data/lib/stripe/stripe_object.rb +3 -8
  158. data/lib/stripe/util.rb +2 -8
  159. data/lib/stripe/version.rb +1 -1
  160. data/lib/stripe.rb +0 -45
  161. data/stripe.gemspec +1 -2
  162. metadata +4 -62
  163. data/lib/stripe/request_signing_authenticator.rb +0 -79
  164. data/lib/stripe/resources/account_notice.rb +0 -60
  165. data/lib/stripe/resources/application.rb +0 -20
  166. data/lib/stripe/resources/billing/alert_triggered.rb +0 -26
  167. data/lib/stripe/resources/billing/meter_error_report.rb +0 -44
  168. data/lib/stripe/resources/capital/financing_offer.rb +0 -94
  169. data/lib/stripe/resources/capital/financing_summary.rb +0 -32
  170. data/lib/stripe/resources/capital/financing_transaction.rb +0 -56
  171. data/lib/stripe/resources/connect_collection_transfer.rb +0 -24
  172. data/lib/stripe/resources/entitlements/active_entitlement_summary.rb +0 -23
  173. data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +0 -27
  174. data/lib/stripe/resources/financial_connections/institution.rb +0 -61
  175. data/lib/stripe/resources/gift_cards/card.rb +0 -96
  176. data/lib/stripe/resources/gift_cards/transaction.rb +0 -132
  177. data/lib/stripe/resources/invoice_payment.rb +0 -46
  178. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +0 -145
  179. data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +0 -49
  180. data/lib/stripe/resources/issuing/fraud_liability_debit.rb +0 -43
  181. data/lib/stripe/resources/issuing/settlement.rb +0 -49
  182. data/lib/stripe/resources/margin.rb +0 -56
  183. data/lib/stripe/resources/order.rb +0 -322
  184. data/lib/stripe/resources/payment_attempt_record.rb +0 -100
  185. data/lib/stripe/resources/payment_record.rb +0 -188
  186. data/lib/stripe/resources/quote_line.rb +0 -136
  187. data/lib/stripe/resources/quote_preview_invoice.rb +0 -374
  188. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +0 -170
  189. data/lib/stripe/resources/reserve_transaction.rb +0 -22
  190. data/lib/stripe/resources/source_mandate_notification.rb +0 -59
  191. data/lib/stripe/resources/tax/association.rb +0 -60
  192. data/lib/stripe/resources/tax/form.rb +0 -124
  193. data/lib/stripe/resources/tax_deducted_at_source.rb +0 -22
  194. data/lib/stripe/resources/terminal/reader_collected_data.rb +0 -30
  195. data/lib/stripe/resources/v2/amount.rb +0 -9
  196. data/lib/stripe/services/account_notice_service.rb +0 -39
  197. data/lib/stripe/services/capital/financing_offer_service.rb +0 -42
  198. data/lib/stripe/services/capital/financing_summary_service.rb +0 -19
  199. data/lib/stripe/services/capital/financing_transaction_service.rb +0 -31
  200. data/lib/stripe/services/capital_service.rb +0 -15
  201. data/lib/stripe/services/financial_connections/account_inferred_balance_service.rb +0 -19
  202. data/lib/stripe/services/financial_connections/institution_service.rb +0 -30
  203. data/lib/stripe/services/gift_cards/card_service.rb +0 -63
  204. data/lib/stripe/services/gift_cards/transaction_service.rb +0 -74
  205. data/lib/stripe/services/gift_cards_service.rb +0 -14
  206. data/lib/stripe/services/invoice_payment_service.rb +0 -28
  207. data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +0 -74
  208. data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +0 -30
  209. data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +0 -30
  210. data/lib/stripe/services/margin_service.rb +0 -50
  211. data/lib/stripe/services/order_line_item_service.rb +0 -17
  212. data/lib/stripe/services/order_service.rb +0 -78
  213. data/lib/stripe/services/payment_attempt_record_service.rb +0 -28
  214. data/lib/stripe/services/payment_record_service.rb +0 -78
  215. data/lib/stripe/services/quote_line_service.rb +0 -17
  216. data/lib/stripe/services/quote_preview_invoice_service.rb +0 -17
  217. data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +0 -17
  218. data/lib/stripe/services/tax/association_service.rb +0 -19
  219. data/lib/stripe/services/tax/form_service.rb +0 -37
  220. data/lib/stripe/services/terminal/reader_collected_data_service.rb +0 -19
@@ -1,43 +0,0 @@
1
- # File generated from our OpenAPI spec
2
- # frozen_string_literal: true
3
-
4
- module Stripe
5
- module Issuing
6
- # A fraud liability debit occurs when Stripe debits a platform's account for fraud losses on Issuing transactions.
7
- class FraudLiabilityDebit < APIResource
8
- extend Stripe::APIOperations::List
9
-
10
- OBJECT_NAME = "issuing.fraud_liability_debit"
11
- def self.object_name
12
- "issuing.fraud_liability_debit"
13
- end
14
-
15
- # Debited amount. This is equal to the disputed amount and is given in the card’s currency and in the smallest currency unit.
16
- attr_reader :amount
17
- # ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this debit.
18
- attr_reader :balance_transaction
19
- # Time at which the object was created. Measured in seconds since the Unix epoch.
20
- attr_reader :created
21
- # The currency of the debit. 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).
22
- attr_reader :currency
23
- # The ID of the linked dispute.
24
- attr_reader :dispute
25
- # Unique identifier for the object.
26
- attr_reader :id
27
- # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
28
- attr_reader :livemode
29
- # String representing the object's type. Objects of the same type share the same value.
30
- attr_reader :object
31
-
32
- # Returns a list of Issuing FraudLiabilityDebit objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
33
- def self.list(filters = {}, opts = {})
34
- request_stripe_object(
35
- method: :get,
36
- path: "/v1/issuing/fraud_liability_debits",
37
- params: filters,
38
- opts: opts
39
- )
40
- end
41
- end
42
- end
43
- end
@@ -1,49 +0,0 @@
1
- # File generated from our OpenAPI spec
2
- # frozen_string_literal: true
3
-
4
- module Stripe
5
- module Issuing
6
- # When a non-stripe BIN is used, any use of an [issued card](https://stripe.com/docs/issuing) must be settled directly with the card network. The net amount owed is represented by an Issuing `Settlement` object.
7
- class Settlement < APIResource
8
- OBJECT_NAME = "issuing.settlement"
9
- def self.object_name
10
- "issuing.settlement"
11
- end
12
-
13
- # The Bank Identification Number reflecting this settlement record.
14
- attr_reader :bin
15
- # The date that the transactions are cleared and posted to user's accounts.
16
- attr_reader :clearing_date
17
- # Time at which the object was created. Measured in seconds since the Unix epoch.
18
- attr_reader :created
19
- # 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).
20
- attr_reader :currency
21
- # Unique identifier for the object.
22
- attr_reader :id
23
- # The total interchange received as reimbursement for the transactions.
24
- attr_reader :interchange_fees
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
- # 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.
28
- attr_reader :metadata
29
- # The total net amount required to settle with the network.
30
- attr_reader :net_total
31
- # The card network for this settlement report. One of ["visa", "maestro"]
32
- attr_reader :network
33
- # The total amount of fees owed to the network.
34
- attr_reader :network_fees
35
- # The Settlement Identification Number assigned by the network.
36
- attr_reader :network_settlement_identifier
37
- # String representing the object's type. Objects of the same type share the same value.
38
- attr_reader :object
39
- # One of `international` or `uk_national_net`.
40
- attr_reader :settlement_service
41
- # The current processing status of this settlement.
42
- attr_reader :status
43
- # The total number of transactions reflected in this settlement.
44
- attr_reader :transaction_count
45
- # The total transaction amount reflected in this settlement.
46
- attr_reader :transaction_volume
47
- end
48
- end
49
- end
@@ -1,56 +0,0 @@
1
- # File generated from our OpenAPI spec
2
- # frozen_string_literal: true
3
-
4
- module Stripe
5
- # A (partner) margin represents a specific discount distributed in partner reseller programs to business partners who
6
- # resell products and services and earn a discount (margin) for doing so.
7
- class Margin < APIResource
8
- extend Stripe::APIOperations::Create
9
- extend Stripe::APIOperations::List
10
- include Stripe::APIOperations::Save
11
-
12
- OBJECT_NAME = "margin"
13
- def self.object_name
14
- "margin"
15
- end
16
-
17
- # Whether the margin can be applied to invoices, invoice items, or invoice line items. Defaults to `true`.
18
- attr_reader :active
19
- # Time at which the object was created. Measured in seconds since the Unix epoch.
20
- attr_reader :created
21
- # Unique identifier for the object.
22
- attr_reader :id
23
- # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
24
- attr_reader :livemode
25
- # 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.
26
- attr_reader :metadata
27
- # Name of the margin that's displayed on, for example, invoices.
28
- attr_reader :name
29
- # String representing the object's type. Objects of the same type share the same value.
30
- attr_reader :object
31
- # Percent that will be taken off the subtotal before tax (after all other discounts and promotions) of any invoice to which the margin is applied.
32
- attr_reader :percent_off
33
- # Time at which the object was last updated. Measured in seconds since the Unix epoch.
34
- attr_reader :updated
35
-
36
- # Create a margin object to be used with invoices, invoice items, and invoice line items for a customer to represent a partner discount. A margin has a percent_off which is the percent that will be taken off the subtotal after all items and other discounts and promotions) of any invoices for a customer. Calculation of prorations do not include any partner margins applied on the original invoice item.
37
- def self.create(params = {}, opts = {})
38
- request_stripe_object(method: :post, path: "/v1/billing/margins", params: params, opts: opts)
39
- end
40
-
41
- # Retrieve a list of your margins.
42
- def self.list(filters = {}, opts = {})
43
- request_stripe_object(method: :get, path: "/v1/billing/margins", params: filters, opts: opts)
44
- end
45
-
46
- # Update the specified margin object. Certain fields of the margin object are not editable.
47
- def self.update(id, params = {}, opts = {})
48
- request_stripe_object(
49
- method: :post,
50
- path: format("/v1/billing/margins/%<id>s", { id: CGI.escape(id) }),
51
- params: params,
52
- opts: opts
53
- )
54
- end
55
- end
56
- end
@@ -1,322 +0,0 @@
1
- # File generated from our OpenAPI spec
2
- # frozen_string_literal: true
3
-
4
- module Stripe
5
- # An Order describes a purchase being made by a customer, including the
6
- # products & quantities being purchased, the order status, the payment information,
7
- # and the billing/shipping details.
8
- #
9
- # Related guide: [Orders overview](https://stripe.com/docs/orders)
10
- class Order < APIResource
11
- extend Stripe::APIOperations::Create
12
- extend Stripe::APIOperations::List
13
- include Stripe::APIOperations::Save
14
-
15
- OBJECT_NAME = "order"
16
- def self.object_name
17
- "order"
18
- end
19
-
20
- class AutomaticTax < Stripe::StripeObject
21
- attr_reader :enabled, :status
22
- end
23
-
24
- class BillingDetails < Stripe::StripeObject
25
- class Address < Stripe::StripeObject
26
- attr_reader :city, :country, :line1, :line2, :postal_code, :state
27
- end
28
- attr_reader :address, :email, :name, :phone
29
- end
30
-
31
- class Credit < Stripe::StripeObject
32
- class GiftCard < Stripe::StripeObject
33
- attr_reader :card
34
- end
35
- attr_reader :amount, :gift_card, :ineligible_line_items, :type
36
- end
37
-
38
- class Payment < Stripe::StripeObject
39
- class Settings < Stripe::StripeObject
40
- class AutomaticPaymentMethods < Stripe::StripeObject
41
- attr_reader :enabled
42
- end
43
-
44
- class PaymentMethodOptions < Stripe::StripeObject
45
- class AcssDebit < Stripe::StripeObject
46
- class MandateOptions < Stripe::StripeObject
47
- attr_reader :custom_mandate_url, :interval_description, :payment_schedule, :transaction_type
48
- end
49
- attr_reader :mandate_options, :setup_future_usage, :verification_method
50
- end
51
-
52
- class AfterpayClearpay < Stripe::StripeObject
53
- attr_reader :capture_method, :reference, :setup_future_usage
54
- end
55
-
56
- class Alipay < Stripe::StripeObject
57
- attr_reader :setup_future_usage
58
- end
59
-
60
- class Bancontact < Stripe::StripeObject
61
- attr_reader :preferred_language, :setup_future_usage
62
- end
63
-
64
- class Card < Stripe::StripeObject
65
- attr_reader :capture_method, :setup_future_usage
66
- end
67
-
68
- class CustomerBalance < Stripe::StripeObject
69
- class BankTransfer < Stripe::StripeObject
70
- class EuBankTransfer < Stripe::StripeObject
71
- attr_reader :country
72
- end
73
- attr_reader :eu_bank_transfer, :requested_address_types, :type
74
- end
75
- attr_reader :bank_transfer, :funding_type, :setup_future_usage
76
- end
77
-
78
- class Ideal < Stripe::StripeObject
79
- attr_reader :setup_future_usage
80
- end
81
-
82
- class Klarna < Stripe::StripeObject
83
- attr_reader :capture_method, :preferred_locale, :setup_future_usage
84
- end
85
-
86
- class Link < Stripe::StripeObject
87
- attr_reader :capture_method, :persistent_token, :setup_future_usage
88
- end
89
-
90
- class Oxxo < Stripe::StripeObject
91
- attr_reader :expires_after_days, :setup_future_usage
92
- end
93
-
94
- class P24 < Stripe::StripeObject
95
- attr_reader :setup_future_usage
96
- end
97
-
98
- class Paypal < Stripe::StripeObject
99
- class LineItem < Stripe::StripeObject
100
- class Tax < Stripe::StripeObject
101
- attr_reader :amount, :behavior
102
- end
103
- attr_reader :category, :description, :name, :quantity, :sku, :sold_by, :tax, :unit_amount
104
- end
105
- attr_reader :capture_method, :line_items, :preferred_locale, :reference, :reference_id, :setup_future_usage, :subsellers
106
- end
107
-
108
- class SepaDebit < Stripe::StripeObject
109
- class MandateOptions < Stripe::StripeObject
110
- attr_reader :reference_prefix
111
- end
112
- attr_reader :mandate_options, :setup_future_usage
113
- end
114
-
115
- class Sofort < Stripe::StripeObject
116
- attr_reader :preferred_language, :setup_future_usage
117
- end
118
-
119
- class WechatPay < Stripe::StripeObject
120
- attr_reader :app_id, :client, :setup_future_usage
121
- end
122
- attr_reader :acss_debit, :afterpay_clearpay, :alipay, :bancontact, :card, :customer_balance, :ideal, :klarna, :link, :oxxo, :p24, :paypal, :sepa_debit, :sofort, :wechat_pay
123
- end
124
-
125
- class TransferData < Stripe::StripeObject
126
- attr_reader :amount, :destination
127
- end
128
- attr_reader :application_fee_amount, :automatic_payment_methods, :payment_method_options, :payment_method_types, :return_url, :statement_descriptor, :statement_descriptor_suffix, :transfer_data
129
- end
130
- attr_reader :payment_intent, :settings, :status
131
- end
132
-
133
- class ShippingCost < Stripe::StripeObject
134
- class Tax < Stripe::StripeObject
135
- attr_reader :amount, :rate, :taxability_reason, :taxable_amount
136
- end
137
- attr_reader :amount_subtotal, :amount_tax, :amount_total, :shipping_rate, :taxes
138
- end
139
-
140
- class ShippingDetails < Stripe::StripeObject
141
- class Address < Stripe::StripeObject
142
- attr_reader :city, :country, :line1, :line2, :postal_code, :state
143
- end
144
- attr_reader :address, :name, :phone
145
- end
146
-
147
- class TaxDetails < Stripe::StripeObject
148
- class TaxId < Stripe::StripeObject
149
- attr_reader :type, :value
150
- end
151
- attr_reader :tax_exempt, :tax_ids
152
- end
153
-
154
- class TotalDetails < Stripe::StripeObject
155
- class Breakdown < Stripe::StripeObject
156
- class Discount < Stripe::StripeObject
157
- attr_reader :amount, :discount
158
- end
159
-
160
- class Tax < Stripe::StripeObject
161
- attr_reader :amount, :rate, :taxability_reason, :taxable_amount
162
- end
163
- attr_reader :discounts, :taxes
164
- end
165
- attr_reader :amount_credit, :amount_discount, :amount_shipping, :amount_tax, :breakdown
166
- end
167
- # Attribute for field amount_remaining
168
- attr_reader :amount_remaining
169
- # Order cost before any discounts or taxes are applied. A positive integer representing the subtotal of the order in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency).
170
- attr_reader :amount_subtotal
171
- # Total order cost after discounts and taxes are applied. A positive integer representing the cost of the order in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). To submit an order, the total must be either 0 or at least $0.50 USD or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts).
172
- attr_reader :amount_total
173
- # ID of the Connect application that created the Order, if any.
174
- attr_reader :application
175
- # Attribute for field automatic_tax
176
- attr_reader :automatic_tax
177
- # Customer billing details associated with the order.
178
- attr_reader :billing_details
179
- # The client secret of this Order. Used for client-side retrieval using a publishable key.
180
- #
181
- # The client secret can be used to complete a payment for an Order from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.
182
- #
183
- # Refer to our docs for [creating and processing an order](https://stripe.com/docs/orders-beta/create-and-process) to learn about how client_secret should be handled.
184
- attr_reader :client_secret
185
- # Time at which the object was created. Measured in seconds since the Unix epoch.
186
- attr_reader :created
187
- # The credits applied to the Order. At most 10 credits can be applied to an Order.
188
- attr_reader :credits
189
- # 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).
190
- attr_reader :currency
191
- # The customer which this orders belongs to.
192
- attr_reader :customer
193
- # An arbitrary string attached to the object. Often useful for displaying to users.
194
- attr_reader :description
195
- # The discounts applied to the order. Use `expand[]=discounts` to expand each discount.
196
- attr_reader :discounts
197
- # Unique identifier for the object.
198
- attr_reader :id
199
- # A recent IP address of the purchaser used for tax reporting and tax location inference.
200
- attr_reader :ip_address
201
- # A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. There is a maximum of 100 line items.
202
- attr_reader :line_items
203
- # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
204
- attr_reader :livemode
205
- # 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.
206
- attr_reader :metadata
207
- # String representing the object's type. Objects of the same type share the same value.
208
- attr_reader :object
209
- # Attribute for field payment
210
- attr_reader :payment
211
- # The details of the customer cost of shipping, including the customer chosen ShippingRate.
212
- attr_reader :shipping_cost
213
- # Customer shipping information associated with the order.
214
- attr_reader :shipping_details
215
- # The overall status of the order.
216
- attr_reader :status
217
- # Attribute for field tax_details
218
- attr_reader :tax_details
219
- # Attribute for field total_details
220
- attr_reader :total_details
221
-
222
- # Cancels the order as well as the payment intent if one is attached.
223
- def cancel(params = {}, opts = {})
224
- request_stripe_object(
225
- method: :post,
226
- path: format("/v1/orders/%<id>s/cancel", { id: CGI.escape(self["id"]) }),
227
- params: params,
228
- opts: opts
229
- )
230
- end
231
-
232
- # Cancels the order as well as the payment intent if one is attached.
233
- def self.cancel(id, params = {}, opts = {})
234
- request_stripe_object(
235
- method: :post,
236
- path: format("/v1/orders/%<id>s/cancel", { id: CGI.escape(id) }),
237
- params: params,
238
- opts: opts
239
- )
240
- end
241
-
242
- # Creates a new open order object.
243
- def self.create(params = {}, opts = {})
244
- request_stripe_object(method: :post, path: "/v1/orders", params: params, opts: opts)
245
- end
246
-
247
- # Returns a list of your orders. The orders are returned sorted by creation date, with the most recently created orders appearing first.
248
- def self.list(filters = {}, opts = {})
249
- request_stripe_object(method: :get, path: "/v1/orders", params: filters, opts: opts)
250
- end
251
-
252
- # When retrieving an order, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
253
- def list_line_items(params = {}, opts = {})
254
- request_stripe_object(
255
- method: :get,
256
- path: format("/v1/orders/%<id>s/line_items", { id: CGI.escape(self["id"]) }),
257
- params: params,
258
- opts: opts
259
- )
260
- end
261
-
262
- # When retrieving an order, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
263
- def self.list_line_items(id, params = {}, opts = {})
264
- request_stripe_object(
265
- method: :get,
266
- path: format("/v1/orders/%<id>s/line_items", { id: CGI.escape(id) }),
267
- params: params,
268
- opts: opts
269
- )
270
- end
271
-
272
- # Reopens a submitted order.
273
- def reopen(params = {}, opts = {})
274
- request_stripe_object(
275
- method: :post,
276
- path: format("/v1/orders/%<id>s/reopen", { id: CGI.escape(self["id"]) }),
277
- params: params,
278
- opts: opts
279
- )
280
- end
281
-
282
- # Reopens a submitted order.
283
- def self.reopen(id, params = {}, opts = {})
284
- request_stripe_object(
285
- method: :post,
286
- path: format("/v1/orders/%<id>s/reopen", { id: CGI.escape(id) }),
287
- params: params,
288
- opts: opts
289
- )
290
- end
291
-
292
- # Submitting an Order transitions the status to processing and creates a PaymentIntent object so the order can be paid. If the Order has an amount_total of 0, no PaymentIntent object will be created. Once the order is submitted, its contents cannot be changed, unless the [reopen](https://stripe.com/docs/api#reopen_order) method is called.
293
- def submit(params = {}, opts = {})
294
- request_stripe_object(
295
- method: :post,
296
- path: format("/v1/orders/%<id>s/submit", { id: CGI.escape(self["id"]) }),
297
- params: params,
298
- opts: opts
299
- )
300
- end
301
-
302
- # Submitting an Order transitions the status to processing and creates a PaymentIntent object so the order can be paid. If the Order has an amount_total of 0, no PaymentIntent object will be created. Once the order is submitted, its contents cannot be changed, unless the [reopen](https://stripe.com/docs/api#reopen_order) method is called.
303
- def self.submit(id, params = {}, opts = {})
304
- request_stripe_object(
305
- method: :post,
306
- path: format("/v1/orders/%<id>s/submit", { id: CGI.escape(id) }),
307
- params: params,
308
- opts: opts
309
- )
310
- end
311
-
312
- # Updates the specific order by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
313
- def self.update(id, params = {}, opts = {})
314
- request_stripe_object(
315
- method: :post,
316
- path: format("/v1/orders/%<id>s", { id: CGI.escape(id) }),
317
- params: params,
318
- opts: opts
319
- )
320
- end
321
- end
322
- end
@@ -1,100 +0,0 @@
1
- # File generated from our OpenAPI spec
2
- # frozen_string_literal: true
3
-
4
- module Stripe
5
- # A Payment Attempt Record represents an individual attempt at making a payment, on or off Stripe.
6
- # Each payment attempt tries to collect a fixed amount of money from a fixed customer and payment
7
- # method. Payment Attempt Records are attached to Payment Records. Only one attempt per Payment Record
8
- # can have guaranteed funds.
9
- class PaymentAttemptRecord < APIResource
10
- extend Stripe::APIOperations::List
11
-
12
- OBJECT_NAME = "payment_attempt_record"
13
- def self.object_name
14
- "payment_attempt_record"
15
- end
16
-
17
- class AmountCanceled < Stripe::StripeObject
18
- attr_reader :currency, :value
19
- end
20
-
21
- class AmountFailed < Stripe::StripeObject
22
- attr_reader :currency, :value
23
- end
24
-
25
- class AmountGuaranteed < Stripe::StripeObject
26
- attr_reader :currency, :value
27
- end
28
-
29
- class AmountRequested < Stripe::StripeObject
30
- attr_reader :currency, :value
31
- end
32
-
33
- class CustomerDetails < Stripe::StripeObject
34
- attr_reader :customer, :email, :name, :phone
35
- end
36
-
37
- class PaymentMethodDetails < Stripe::StripeObject
38
- class BillingDetails < Stripe::StripeObject
39
- class Address < Stripe::StripeObject
40
- attr_reader :city, :country, :line1, :line2, :postal_code, :state
41
- end
42
- attr_reader :address, :email, :name, :phone
43
- end
44
-
45
- class Custom < Stripe::StripeObject
46
- attr_reader :display_name, :type
47
- end
48
- attr_reader :billing_details, :custom, :payment_method, :type
49
- end
50
-
51
- class ShippingDetails < Stripe::StripeObject
52
- class Address < Stripe::StripeObject
53
- attr_reader :city, :country, :line1, :line2, :postal_code, :state
54
- end
55
- attr_reader :address, :name, :phone
56
- end
57
- # A representation of an amount of money, consisting of an amount and a currency.
58
- attr_reader :amount_canceled
59
- # A representation of an amount of money, consisting of an amount and a currency.
60
- attr_reader :amount_failed
61
- # A representation of an amount of money, consisting of an amount and a currency.
62
- attr_reader :amount_guaranteed
63
- # A representation of an amount of money, consisting of an amount and a currency.
64
- attr_reader :amount_requested
65
- # Time at which the object was created. Measured in seconds since the Unix epoch.
66
- attr_reader :created
67
- # Customer information for this payment.
68
- attr_reader :customer_details
69
- # Indicates whether the customer was present in your checkout flow during this payment.
70
- attr_reader :customer_presence
71
- # An arbitrary string attached to the object. Often useful for displaying to users.
72
- attr_reader :description
73
- # Unique identifier for the object.
74
- attr_reader :id
75
- # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
76
- attr_reader :livemode
77
- # 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.
78
- attr_reader :metadata
79
- # String representing the object's type. Objects of the same type share the same value.
80
- attr_reader :object
81
- # Information about the Payment Method debited for this payment.
82
- attr_reader :payment_method_details
83
- # ID of the Payment Record this Payment Attempt Record belongs to.
84
- attr_reader :payment_record
85
- # An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID.
86
- attr_reader :payment_reference
87
- # Shipping information for this payment.
88
- attr_reader :shipping_details
89
-
90
- # List all the Payment Attempt Records attached to the specified Payment Record.
91
- def self.list(filters = {}, opts = {})
92
- request_stripe_object(
93
- method: :get,
94
- path: "/v1/payment_attempt_records",
95
- params: filters,
96
- opts: opts
97
- )
98
- end
99
- end
100
- end