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
@@ -13,6 +13,52 @@ module Stripe
13
13
  "issuing.token"
14
14
  end
15
15
 
16
+ class NetworkData < Stripe::StripeObject
17
+ class Device < Stripe::StripeObject
18
+ attr_reader :device_fingerprint, :ip_address, :location, :name, :phone_number, :type
19
+ end
20
+
21
+ class Mastercard < Stripe::StripeObject
22
+ attr_reader :card_reference_id, :token_reference_id, :token_requestor_id, :token_requestor_name
23
+ end
24
+
25
+ class Visa < Stripe::StripeObject
26
+ attr_reader :card_reference_id, :token_reference_id, :token_requestor_id, :token_risk_score
27
+ end
28
+
29
+ class WalletProvider < Stripe::StripeObject
30
+ class CardholderAddress < Stripe::StripeObject
31
+ attr_reader :line1, :postal_code
32
+ end
33
+ attr_reader :account_id, :account_trust_score, :card_number_source, :cardholder_address, :cardholder_name, :device_trust_score, :hashed_account_email_address, :reason_codes, :suggested_decision, :suggested_decision_version
34
+ end
35
+ attr_reader :device, :mastercard, :type, :visa, :wallet_provider
36
+ end
37
+ # Card associated with this token.
38
+ attr_reader :card
39
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
40
+ attr_reader :created
41
+ # The hashed ID derived from the device ID from the card network associated with the token.
42
+ attr_reader :device_fingerprint
43
+ # Unique identifier for the object.
44
+ attr_reader :id
45
+ # The last four digits of the token.
46
+ attr_reader :last4
47
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
48
+ attr_reader :livemode
49
+ # The token service provider / card network associated with the token.
50
+ attr_reader :network
51
+ # Attribute for field network_data
52
+ attr_reader :network_data
53
+ # Time at which the token was last updated by the card network. Measured in seconds since the Unix epoch.
54
+ attr_reader :network_updated_at
55
+ # String representing the object's type. Objects of the same type share the same value.
56
+ attr_reader :object
57
+ # The usage state of the token.
58
+ attr_reader :status
59
+ # The digital wallet for this token, if one was used.
60
+ attr_reader :wallet_provider
61
+
16
62
  # Lists all Issuing Token objects for a given card.
17
63
  def self.list(filters = {}, opts = {})
18
64
  request_stripe_object(method: :get, path: "/v1/issuing/tokens", params: filters, opts: opts)
@@ -17,6 +17,112 @@ module Stripe
17
17
  "issuing.transaction"
18
18
  end
19
19
 
20
+ class AmountDetails < Stripe::StripeObject
21
+ attr_reader :atm_fee, :cashback_amount
22
+ end
23
+
24
+ class MerchantData < Stripe::StripeObject
25
+ attr_reader :category, :category_code, :city, :country, :name, :network_id, :postal_code, :state, :terminal_id, :url
26
+ end
27
+
28
+ class NetworkData < Stripe::StripeObject
29
+ attr_reader :authorization_code, :processing_date, :transaction_id
30
+ end
31
+
32
+ class PurchaseDetails < Stripe::StripeObject
33
+ class Fleet < Stripe::StripeObject
34
+ class CardholderPromptData < Stripe::StripeObject
35
+ attr_reader :driver_id, :odometer, :unspecified_id, :user_id, :vehicle_number
36
+ end
37
+
38
+ class ReportedBreakdown < Stripe::StripeObject
39
+ class Fuel < Stripe::StripeObject
40
+ attr_reader :gross_amount_decimal
41
+ end
42
+
43
+ class NonFuel < Stripe::StripeObject
44
+ attr_reader :gross_amount_decimal
45
+ end
46
+
47
+ class Tax < Stripe::StripeObject
48
+ attr_reader :local_amount_decimal, :national_amount_decimal
49
+ end
50
+ attr_reader :fuel, :non_fuel, :tax
51
+ end
52
+ attr_reader :cardholder_prompt_data, :purchase_type, :reported_breakdown, :service_type
53
+ end
54
+
55
+ class Flight < Stripe::StripeObject
56
+ class Segment < Stripe::StripeObject
57
+ attr_reader :arrival_airport_code, :carrier, :departure_airport_code, :flight_number, :service_class, :stopover_allowed
58
+ end
59
+ attr_reader :departure_at, :passenger_name, :refundable, :segments, :travel_agency
60
+ end
61
+
62
+ class Fuel < Stripe::StripeObject
63
+ attr_reader :industry_product_code, :quantity_decimal, :type, :unit, :unit_cost_decimal
64
+ end
65
+
66
+ class Lodging < Stripe::StripeObject
67
+ attr_reader :check_in_at, :nights
68
+ end
69
+
70
+ class Receipt < Stripe::StripeObject
71
+ attr_reader :description, :quantity, :total, :unit_cost
72
+ end
73
+ attr_reader :fleet, :flight, :fuel, :lodging, :receipt, :reference
74
+ end
75
+
76
+ class Treasury < Stripe::StripeObject
77
+ attr_reader :received_credit, :received_debit
78
+ end
79
+ # The transaction amount, which will be reflected in your balance. This amount is in your currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
80
+ attr_reader :amount
81
+ # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
82
+ attr_reader :amount_details
83
+ # The `Authorization` object that led to this transaction.
84
+ attr_reader :authorization
85
+ # ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this transaction.
86
+ attr_reader :balance_transaction
87
+ # The card used to make this transaction.
88
+ attr_reader :card
89
+ # The cardholder to whom this transaction belongs.
90
+ attr_reader :cardholder
91
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
92
+ attr_reader :created
93
+ # 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).
94
+ attr_reader :currency
95
+ # If you've disputed the transaction, the ID of the dispute.
96
+ attr_reader :dispute
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
+ # The amount that the merchant will receive, denominated in `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). It will be different from `amount` if the merchant is taking payment in a different currency.
102
+ attr_reader :merchant_amount
103
+ # The currency with which the merchant is taking payment.
104
+ attr_reader :merchant_currency
105
+ # Attribute for field merchant_data
106
+ attr_reader :merchant_data
107
+ # 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.
108
+ attr_reader :metadata
109
+ # Details about the transaction, such as processing dates, set by the card network.
110
+ attr_reader :network_data
111
+ # String representing the object's type. Objects of the same type share the same value.
112
+ attr_reader :object
113
+ # Additional purchase information that is optionally provided by the merchant.
114
+ attr_reader :purchase_details
115
+ # Attribute for field settlement
116
+ attr_reader :settlement
117
+ # [Token](https://stripe.com/docs/api/issuing/tokens/object) object used for this transaction. If a network token was not used for this transaction, this field will be null.
118
+ attr_reader :token
119
+ # [Treasury](https://stripe.com/docs/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts
120
+ attr_reader :treasury
121
+ # The nature of the transaction.
122
+ attr_reader :type
123
+ # The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`.
124
+ attr_reader :wallet
125
+
20
126
  # Returns a list of Issuing Transaction objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
21
127
  def self.list(filters = {}, opts = {})
22
128
  request_stripe_object(
@@ -8,5 +8,55 @@ module Stripe
8
8
  def self.object_name
9
9
  "item"
10
10
  end
11
+
12
+ class AdjustableQuantity < Stripe::StripeObject
13
+ attr_reader :enabled, :maximum, :minimum
14
+ end
15
+
16
+ class Discount < Stripe::StripeObject
17
+ attr_reader :amount, :discount
18
+ end
19
+
20
+ class Display < Stripe::StripeObject
21
+ attr_reader :description, :images, :name
22
+ end
23
+
24
+ class Tax < Stripe::StripeObject
25
+ attr_reader :amount, :rate, :taxability_reason, :taxable_amount
26
+ end
27
+ # Attribute for field adjustable_quantity
28
+ attr_reader :adjustable_quantity
29
+ # Total discount amount applied. If no discounts were applied, defaults to 0.
30
+ attr_reader :amount_discount
31
+ # Total before any discounts or taxes are applied.
32
+ attr_reader :amount_subtotal
33
+ # Total tax amount applied. If no tax was applied, defaults to 0.
34
+ attr_reader :amount_tax
35
+ # Total after discounts and taxes.
36
+ attr_reader :amount_total
37
+ # 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).
38
+ attr_reader :currency
39
+ # An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name.
40
+ attr_reader :description
41
+ # The discounts applied to the line item.
42
+ attr_reader :discounts
43
+ # Attribute for field display
44
+ attr_reader :display
45
+ # Unique identifier for the object.
46
+ attr_reader :id
47
+ # 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.
48
+ attr_reader :metadata
49
+ # String representing the object's type. Objects of the same type share the same value.
50
+ attr_reader :object
51
+ # The price used to generate the line item.
52
+ attr_reader :price
53
+ # The ID of the product for this line item.
54
+ #
55
+ # This will always be the same as `price.product`.
56
+ attr_reader :product
57
+ # The quantity of products being purchased.
58
+ attr_reader :quantity
59
+ # The taxes applied to the line item.
60
+ attr_reader :taxes
11
61
  end
12
62
  end
@@ -9,6 +9,13 @@ module Stripe
9
9
  "login_link"
10
10
  end
11
11
 
12
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
13
+ attr_reader :created
14
+ # String representing the object's type. Objects of the same type share the same value.
15
+ attr_reader :object
16
+ # The URL for the login link.
17
+ attr_reader :url
18
+
12
19
  def self.retrieve(_id, _opts = nil)
13
20
  raise NotImplementedError,
14
21
  "Login links do not have IDs and cannot be retrieved. They can " \
@@ -8,5 +8,83 @@ module Stripe
8
8
  def self.object_name
9
9
  "mandate"
10
10
  end
11
+
12
+ class CustomerAcceptance < Stripe::StripeObject
13
+ class Offline < Stripe::StripeObject; end
14
+
15
+ class Online < Stripe::StripeObject
16
+ attr_reader :ip_address, :user_agent
17
+ end
18
+ attr_reader :accepted_at, :offline, :online, :type
19
+ end
20
+
21
+ class MultiUse < Stripe::StripeObject; end
22
+
23
+ class PaymentMethodDetails < Stripe::StripeObject
24
+ class AcssDebit < Stripe::StripeObject
25
+ attr_reader :default_for, :interval_description, :payment_schedule, :transaction_type
26
+ end
27
+
28
+ class AmazonPay < Stripe::StripeObject; end
29
+
30
+ class AuBecsDebit < Stripe::StripeObject
31
+ attr_reader :url
32
+ end
33
+
34
+ class BacsDebit < Stripe::StripeObject
35
+ attr_reader :network_status, :reference, :revocation_reason, :url
36
+ end
37
+
38
+ class Card < Stripe::StripeObject; end
39
+ class Cashapp < Stripe::StripeObject; end
40
+ class KakaoPay < Stripe::StripeObject; end
41
+ class KrCard < Stripe::StripeObject; end
42
+ class Link < Stripe::StripeObject; end
43
+
44
+ class Paypal < Stripe::StripeObject
45
+ attr_reader :billing_agreement_id, :fingerprint, :payer_id, :verified_email
46
+ end
47
+
48
+ class Payto < Stripe::StripeObject
49
+ attr_reader :amount, :amount_type, :end_date, :payment_schedule, :payments_per_period, :purpose, :start_date
50
+ end
51
+
52
+ class RevolutPay < Stripe::StripeObject; end
53
+
54
+ class SepaDebit < Stripe::StripeObject
55
+ attr_reader :reference, :url
56
+ end
57
+
58
+ class UsBankAccount < Stripe::StripeObject
59
+ attr_reader :collection_method
60
+ end
61
+ attr_reader :acss_debit, :amazon_pay, :au_becs_debit, :bacs_debit, :card, :cashapp, :kakao_pay, :kr_card, :link, :paypal, :payto, :revolut_pay, :sepa_debit, :type, :us_bank_account
62
+ end
63
+
64
+ class SingleUse < Stripe::StripeObject
65
+ attr_reader :amount, :currency
66
+ end
67
+ # Attribute for field customer_acceptance
68
+ attr_reader :customer_acceptance
69
+ # Unique identifier for the object.
70
+ attr_reader :id
71
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
72
+ attr_reader :livemode
73
+ # Attribute for field multi_use
74
+ attr_reader :multi_use
75
+ # String representing the object's type. Objects of the same type share the same value.
76
+ attr_reader :object
77
+ # The account (if any) that the mandate is intended for.
78
+ attr_reader :on_behalf_of
79
+ # ID of the payment method associated with this mandate.
80
+ attr_reader :payment_method
81
+ # Attribute for field payment_method_details
82
+ attr_reader :payment_method_details
83
+ # Attribute for field single_use
84
+ attr_reader :single_use
85
+ # The mandate status indicates whether or not you can use it to initiate a payment.
86
+ attr_reader :status
87
+ # The type of the mandate.
88
+ attr_reader :type
11
89
  end
12
90
  end
@@ -14,6 +14,25 @@ module Stripe
14
14
  "margin"
15
15
  end
16
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
+
17
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.
18
37
  def self.create(params = {}, opts = {})
19
38
  request_stripe_object(method: :post, path: "/v1/billing/margins", params: params, opts: opts)
@@ -17,6 +17,208 @@ module Stripe
17
17
  "order"
18
18
  end
19
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
+
20
222
  # Cancels the order as well as the payment intent if one is attached.
21
223
  def cancel(params = {}, opts = {})
22
224
  request_stripe_object(
@@ -14,6 +14,79 @@ module Stripe
14
14
  "payment_attempt_record"
15
15
  end
16
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
+
17
90
  # List all the Payment Attempt Records attached to the specified Payment Record.
18
91
  def self.list(filters = {}, opts = {})
19
92
  request_stripe_object(