stripe 13.3.0.pre.beta.1 → 13.3.0.pre.beta.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (185) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -0
  3. data/OPENAPI_VERSION +1 -1
  4. data/VERSION +1 -1
  5. data/lib/stripe/api_version.rb +1 -1
  6. data/lib/stripe/object_types.rb +10 -0
  7. data/lib/stripe/resources/account.rb +230 -0
  8. data/lib/stripe/resources/account_link.rb +9 -0
  9. data/lib/stripe/resources/account_notice.rb +28 -0
  10. data/lib/stripe/resources/account_session.rb +103 -0
  11. data/lib/stripe/resources/apple_pay_domain.rb +13 -0
  12. data/lib/stripe/resources/application.rb +20 -0
  13. data/lib/stripe/resources/application_fee.rb +34 -0
  14. data/lib/stripe/resources/application_fee_refund.rb +17 -0
  15. data/lib/stripe/resources/apps/secret.rb +22 -0
  16. data/lib/stripe/resources/balance.rb +59 -0
  17. data/lib/stripe/resources/balance_transaction.rb +34 -0
  18. data/lib/stripe/resources/bank_account.rb +60 -2
  19. data/lib/stripe/resources/billing/alert.rb +21 -0
  20. data/lib/stripe/resources/billing/alert_triggered.rb +26 -0
  21. data/lib/stripe/resources/billing/credit_balance_summary.rb +25 -0
  22. data/lib/stripe/resources/billing/credit_balance_transaction.rb +49 -1
  23. data/lib/stripe/resources/billing/credit_grant.rb +46 -2
  24. data/lib/stripe/resources/billing/meter.rb +49 -7
  25. data/lib/stripe/resources/billing/meter_error_report.rb +44 -0
  26. data/lib/stripe/resources/billing/meter_event.rb +17 -3
  27. data/lib/stripe/resources/billing/meter_event_adjustment.rb +17 -1
  28. data/lib/stripe/resources/billing/meter_event_summary.rb +15 -0
  29. data/lib/stripe/resources/billing_portal/configuration.rb +70 -0
  30. data/lib/stripe/resources/billing_portal/session.rb +61 -0
  31. data/lib/stripe/resources/capability.rb +38 -0
  32. data/lib/stripe/resources/capital/financing_offer.rb +45 -0
  33. data/lib/stripe/resources/capital/financing_summary.rb +17 -0
  34. data/lib/stripe/resources/capital/financing_transaction.rb +29 -0
  35. data/lib/stripe/resources/card.rb +76 -0
  36. data/lib/stripe/resources/cash_balance.rb +14 -0
  37. data/lib/stripe/resources/charge.rb +469 -0
  38. data/lib/stripe/resources/checkout/session.rb +496 -0
  39. data/lib/stripe/resources/climate/order.rb +55 -0
  40. data/lib/stripe/resources/climate/product.rb +24 -0
  41. data/lib/stripe/resources/climate/supplier.rb +18 -0
  42. data/lib/stripe/resources/confirmation_token.rb +297 -0
  43. data/lib/stripe/resources/connect_collection_transfer.rb +24 -0
  44. data/lib/stripe/resources/country_spec.rb +27 -0
  45. data/lib/stripe/resources/coupon.rb +44 -0
  46. data/lib/stripe/resources/credit_note.rb +91 -0
  47. data/lib/stripe/resources/credit_note_line_item.rb +46 -0
  48. data/lib/stripe/resources/customer.rb +93 -0
  49. data/lib/stripe/resources/customer_balance_transaction.rb +27 -0
  50. data/lib/stripe/resources/customer_cash_balance_transaction.rb +72 -0
  51. data/lib/stripe/resources/customer_session.rb +34 -0
  52. data/lib/stripe/resources/discount.rb +29 -0
  53. data/lib/stripe/resources/dispute.rb +96 -0
  54. data/lib/stripe/resources/entitlements/active_entitlement.rb +11 -0
  55. data/lib/stripe/resources/entitlements/active_entitlement_summary.rb +23 -0
  56. data/lib/stripe/resources/entitlements/feature.rb +15 -0
  57. data/lib/stripe/resources/ephemeral_key.rb +13 -0
  58. data/lib/stripe/resources/event.rb +44 -0
  59. data/lib/stripe/resources/exchange_rate.rb +7 -0
  60. data/lib/stripe/resources/file.rb +23 -0
  61. data/lib/stripe/resources/file_link.rb +19 -0
  62. data/lib/stripe/resources/financial_connections/account.rb +84 -0
  63. data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +13 -0
  64. data/lib/stripe/resources/financial_connections/account_owner.rb +17 -0
  65. data/lib/stripe/resources/financial_connections/account_ownership.rb +9 -0
  66. data/lib/stripe/resources/financial_connections/institution.rb +35 -0
  67. data/lib/stripe/resources/financial_connections/session.rb +49 -0
  68. data/lib/stripe/resources/financial_connections/transaction.rb +28 -0
  69. data/lib/stripe/resources/forwarding/request.rb +40 -0
  70. data/lib/stripe/resources/funding_instructions.rb +82 -0
  71. data/lib/stripe/resources/gift_cards/card.rb +37 -0
  72. data/lib/stripe/resources/gift_cards/transaction.rb +39 -0
  73. data/lib/stripe/resources/identity/verification_report.rb +92 -0
  74. data/lib/stripe/resources/identity/verification_session.rb +76 -0
  75. data/lib/stripe/resources/invoice.rb +337 -0
  76. data/lib/stripe/resources/invoice_item.rb +54 -0
  77. data/lib/stripe/resources/invoice_line_item.rb +83 -0
  78. data/lib/stripe/resources/invoice_payment.rb +34 -0
  79. data/lib/stripe/resources/invoice_rendering_template.rb +17 -0
  80. data/lib/stripe/resources/issuing/authorization.rb +129 -0
  81. data/lib/stripe/resources/issuing/card.rb +86 -0
  82. data/lib/stripe/resources/issuing/cardholder.rb +76 -0
  83. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +57 -0
  84. data/lib/stripe/resources/issuing/dispute.rb +65 -0
  85. data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +23 -0
  86. data/lib/stripe/resources/issuing/fraud_liability_debit.rb +17 -0
  87. data/lib/stripe/resources/issuing/personalization_design.rb +38 -0
  88. data/lib/stripe/resources/issuing/physical_bundle.rb +18 -0
  89. data/lib/stripe/resources/issuing/settlement.rb +49 -0
  90. data/lib/stripe/resources/issuing/token.rb +46 -0
  91. data/lib/stripe/resources/issuing/transaction.rb +106 -0
  92. data/lib/stripe/resources/line_item.rb +50 -0
  93. data/lib/stripe/resources/login_link.rb +7 -0
  94. data/lib/stripe/resources/mandate.rb +78 -0
  95. data/lib/stripe/resources/margin.rb +19 -0
  96. data/lib/stripe/resources/order.rb +202 -0
  97. data/lib/stripe/resources/payment_attempt_record.rb +73 -0
  98. data/lib/stripe/resources/payment_intent.rb +642 -0
  99. data/lib/stripe/resources/payment_link.rb +198 -0
  100. data/lib/stripe/resources/payment_method.rb +368 -0
  101. data/lib/stripe/resources/payment_method_configuration.rb +430 -0
  102. data/lib/stripe/resources/payment_method_domain.rb +57 -0
  103. data/lib/stripe/resources/payment_record.rb +73 -0
  104. data/lib/stripe/resources/payout.rb +56 -0
  105. data/lib/stripe/resources/person.rb +128 -0
  106. data/lib/stripe/resources/plan.rb +52 -0
  107. data/lib/stripe/resources/price.rb +77 -0
  108. data/lib/stripe/resources/product.rb +60 -0
  109. data/lib/stripe/resources/product_feature.rb +12 -0
  110. data/lib/stripe/resources/promotion_code.rb +35 -0
  111. data/lib/stripe/resources/quote.rb +252 -0
  112. data/lib/stripe/resources/quote_line.rb +136 -0
  113. data/lib/stripe/resources/quote_preview_invoice.rb +331 -0
  114. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +159 -0
  115. data/lib/stripe/resources/radar/early_fraud_warning.rb +17 -0
  116. data/lib/stripe/resources/radar/value_list.rb +23 -0
  117. data/lib/stripe/resources/radar/value_list_item.rb +17 -0
  118. data/lib/stripe/resources/refund.rb +130 -0
  119. data/lib/stripe/resources/reporting/report_run.rb +29 -0
  120. data/lib/stripe/resources/reporting/report_type.rb +19 -0
  121. data/lib/stripe/resources/reserve_transaction.rb +22 -0
  122. data/lib/stripe/resources/reversal.rb +21 -0
  123. data/lib/stripe/resources/review.rb +36 -0
  124. data/lib/stripe/resources/setup_attempt.rb +101 -0
  125. data/lib/stripe/resources/setup_intent.rb +158 -0
  126. data/lib/stripe/resources/shipping_rate.rb +42 -0
  127. data/lib/stripe/resources/sigma/scheduled_query_run.rb +26 -0
  128. data/lib/stripe/resources/source.rb +197 -0
  129. data/lib/stripe/resources/source_mandate_notification.rb +59 -0
  130. data/lib/stripe/resources/source_transaction.rb +48 -0
  131. data/lib/stripe/resources/subscription.rb +214 -0
  132. data/lib/stripe/resources/subscription_item.rb +46 -0
  133. data/lib/stripe/resources/subscription_schedule.rb +153 -0
  134. data/lib/stripe/resources/tax/association.rb +36 -0
  135. data/lib/stripe/resources/tax/calculation.rb +72 -0
  136. data/lib/stripe/resources/tax/calculation_line_item.rb +33 -0
  137. data/lib/stripe/resources/tax/form.rb +75 -0
  138. data/lib/stripe/resources/tax/registration.rb +379 -0
  139. data/lib/stripe/resources/tax/settings.rb +33 -0
  140. data/lib/stripe/resources/tax/transaction.rb +68 -0
  141. data/lib/stripe/resources/tax/transaction_line_item.rb +30 -0
  142. data/lib/stripe/resources/tax_code.rb +9 -0
  143. data/lib/stripe/resources/tax_deducted_at_source.rb +22 -0
  144. data/lib/stripe/resources/tax_id.rb +30 -0
  145. data/lib/stripe/resources/tax_rate.rb +42 -0
  146. data/lib/stripe/resources/terminal/configuration.rb +107 -0
  147. data/lib/stripe/resources/terminal/connection_token.rb +7 -0
  148. data/lib/stripe/resources/terminal/location.rb +20 -0
  149. data/lib/stripe/resources/terminal/reader.rb +118 -0
  150. data/lib/stripe/resources/terminal/reader_collected_data.rb +16 -0
  151. data/lib/stripe/resources/test_helpers/test_clock.rb +27 -0
  152. data/lib/stripe/resources/token.rb +29 -0
  153. data/lib/stripe/resources/topup.rb +33 -0
  154. data/lib/stripe/resources/transfer.rb +35 -0
  155. data/lib/stripe/resources/treasury/credit_reversal.rb +32 -0
  156. data/lib/stripe/resources/treasury/debit_reversal.rb +38 -0
  157. data/lib/stripe/resources/treasury/financial_account.rb +57 -0
  158. data/lib/stripe/resources/treasury/financial_account_features.rb +91 -0
  159. data/lib/stripe/resources/treasury/inbound_transfer.rb +66 -0
  160. data/lib/stripe/resources/treasury/outbound_payment.rb +85 -0
  161. data/lib/stripe/resources/treasury/outbound_transfer.rb +82 -0
  162. data/lib/stripe/resources/treasury/received_credit.rb +70 -0
  163. data/lib/stripe/resources/treasury/received_debit.rb +67 -0
  164. data/lib/stripe/resources/treasury/transaction.rb +42 -0
  165. data/lib/stripe/resources/treasury/transaction_entry.rb +34 -0
  166. data/lib/stripe/resources/usage_record.rb +13 -0
  167. data/lib/stripe/resources/usage_record_summary.rb +18 -0
  168. data/lib/stripe/resources/v2/amount.rb +9 -0
  169. data/lib/stripe/resources/v2/billing/meter_event.rb +18 -0
  170. data/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +20 -0
  171. data/lib/stripe/resources/v2/billing/meter_event_session.rb +14 -0
  172. data/lib/stripe/resources/v2/event.rb +21 -0
  173. data/lib/stripe/resources/v2/event_destination.rb +49 -0
  174. data/lib/stripe/resources/webhook_endpoint.rb +27 -0
  175. data/lib/stripe/resources.rb +10 -0
  176. data/lib/stripe/services/billing/credit_balance_summary_service.rb +1 -1
  177. data/lib/stripe/services/billing/credit_balance_transaction_service.rb +2 -2
  178. data/lib/stripe/services/billing/credit_grant_service.rb +3 -3
  179. data/lib/stripe/services/billing/meter_event_adjustment_service.rb +1 -1
  180. data/lib/stripe/services/billing/meter_event_service.rb +1 -1
  181. data/lib/stripe/services/billing/meter_service.rb +5 -5
  182. data/lib/stripe/stripe_object.rb +5 -0
  183. data/lib/stripe/version.rb +1 -1
  184. data/stripe.gemspec +2 -1
  185. metadata +13 -2
@@ -16,6 +16,33 @@ module Stripe
16
16
  "customer_balance_transaction"
17
17
  end
18
18
 
19
+ # The amount of the transaction. A negative value is a credit for the customer's balance, and a positive value is a debit to the customer's `balance`.
20
+ attr_reader :amount
21
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
22
+ attr_reader :created
23
+ # The ID of the credit note (if any) related to the transaction.
24
+ attr_reader :credit_note
25
+ # 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).
26
+ attr_reader :currency
27
+ # The ID of the customer the transaction belongs to.
28
+ attr_reader :customer
29
+ # An arbitrary string attached to the object. Often useful for displaying to users.
30
+ attr_reader :description
31
+ # The customer's `balance` after the transaction was applied. A negative value decreases the amount due on the customer's next invoice. A positive value increases the amount due on the customer's next invoice.
32
+ attr_reader :ending_balance
33
+ # Unique identifier for the object.
34
+ attr_reader :id
35
+ # The ID of the invoice (if any) related to the transaction.
36
+ attr_reader :invoice
37
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
38
+ attr_reader :livemode
39
+ # 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.
40
+ attr_reader :metadata
41
+ # String representing the object's type. Objects of the same type share the same value.
42
+ attr_reader :object
43
+ # Transaction type: `adjustment`, `applied_to_invoice`, `credit_note`, `initial`, `invoice_overpaid`, `invoice_too_large`, `invoice_too_small`, `unspent_receiver_credit`, or `unapplied_from_invoice`. See the [Customer Balance page](https://stripe.com/docs/billing/customer/balance#types) to learn more about transaction types.
44
+ attr_reader :type
45
+
19
46
  def resource_url
20
47
  if !respond_to?(:customer) || customer.nil?
21
48
  raise NotImplementedError,
@@ -11,5 +11,77 @@ module Stripe
11
11
  def self.object_name
12
12
  "customer_cash_balance_transaction"
13
13
  end
14
+
15
+ class AdjustedForOverdraft < Stripe::StripeObject
16
+ attr_reader :balance_transaction, :linked_transaction
17
+ end
18
+
19
+ class AppliedToPayment < Stripe::StripeObject
20
+ attr_reader :payment_intent
21
+ end
22
+
23
+ class Funded < Stripe::StripeObject
24
+ class BankTransfer < Stripe::StripeObject
25
+ class EuBankTransfer < Stripe::StripeObject
26
+ attr_reader :bic, :iban_last4, :sender_name
27
+ end
28
+
29
+ class GbBankTransfer < Stripe::StripeObject
30
+ attr_reader :account_number_last4, :sender_name, :sort_code
31
+ end
32
+
33
+ class JpBankTransfer < Stripe::StripeObject
34
+ attr_reader :sender_bank, :sender_branch, :sender_name
35
+ end
36
+
37
+ class UsBankTransfer < Stripe::StripeObject
38
+ attr_reader :network, :sender_name
39
+ end
40
+ attr_reader :eu_bank_transfer, :gb_bank_transfer, :jp_bank_transfer, :reference, :type, :us_bank_transfer
41
+ end
42
+ attr_reader :bank_transfer
43
+ end
44
+
45
+ class RefundedFromPayment < Stripe::StripeObject
46
+ attr_reader :refund
47
+ end
48
+
49
+ class TransferredToBalance < Stripe::StripeObject
50
+ attr_reader :balance_transaction
51
+ end
52
+
53
+ class UnappliedFromPayment < Stripe::StripeObject
54
+ attr_reader :payment_intent
55
+ end
56
+ # Attribute for field adjusted_for_overdraft
57
+ attr_reader :adjusted_for_overdraft
58
+ # Attribute for field applied_to_payment
59
+ attr_reader :applied_to_payment
60
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
61
+ attr_reader :created
62
+ # 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).
63
+ attr_reader :currency
64
+ # The customer whose available cash balance changed as a result of this transaction.
65
+ attr_reader :customer
66
+ # The total available cash balance for the specified currency after this transaction was applied. Represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
67
+ attr_reader :ending_balance
68
+ # Attribute for field funded
69
+ attr_reader :funded
70
+ # Unique identifier for the object.
71
+ attr_reader :id
72
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
73
+ attr_reader :livemode
74
+ # The amount by which the cash balance changed, represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance.
75
+ attr_reader :net_amount
76
+ # String representing the object's type. Objects of the same type share the same value.
77
+ attr_reader :object
78
+ # Attribute for field refunded_from_payment
79
+ attr_reader :refunded_from_payment
80
+ # Attribute for field transferred_to_balance
81
+ attr_reader :transferred_to_balance
82
+ # The type of the cash balance transaction. New types may be added in future. See [Customer Balance](https://stripe.com/docs/payments/customer-balance#types) to learn more about these types.
83
+ attr_reader :type
84
+ # Attribute for field unapplied_from_payment
85
+ attr_reader :unapplied_from_payment
14
86
  end
15
87
  end
@@ -16,6 +16,40 @@ module Stripe
16
16
  "customer_session"
17
17
  end
18
18
 
19
+ class Components < Stripe::StripeObject
20
+ class BuyButton < Stripe::StripeObject
21
+ attr_reader :enabled
22
+ end
23
+
24
+ class PaymentElement < Stripe::StripeObject
25
+ class Features < Stripe::StripeObject
26
+ attr_reader :payment_method_allow_redisplay_filters, :payment_method_redisplay, :payment_method_redisplay_limit, :payment_method_remove, :payment_method_save, :payment_method_save_usage
27
+ end
28
+ attr_reader :enabled, :features
29
+ end
30
+
31
+ class PricingTable < Stripe::StripeObject
32
+ attr_reader :enabled
33
+ end
34
+ attr_reader :buy_button, :payment_element, :pricing_table
35
+ end
36
+ # The client secret of this Customer Session. Used on the client to set up secure access to the given `customer`.
37
+ #
38
+ # The client secret can be used to provide access to `customer` from your frontend. It should not be stored, logged, or exposed to anyone other than the relevant customer. Make sure that you have TLS enabled on any page that includes the client secret.
39
+ attr_reader :client_secret
40
+ # Configuration for the components supported by this Customer Session.
41
+ attr_reader :components
42
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
43
+ attr_reader :created
44
+ # The Customer the Customer Session was created for.
45
+ attr_reader :customer
46
+ # The timestamp at which this Customer Session will expire.
47
+ attr_reader :expires_at
48
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
49
+ attr_reader :livemode
50
+ # String representing the object's type. Objects of the same type share the same value.
51
+ attr_reader :object
52
+
19
53
  # Creates a Customer Session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources.
20
54
  def self.create(params = {}, opts = {})
21
55
  request_stripe_object(
@@ -11,5 +11,34 @@ module Stripe
11
11
  def self.object_name
12
12
  "discount"
13
13
  end
14
+
15
+ # The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode.
16
+ attr_reader :checkout_session
17
+ # A coupon contains information about a percent-off or amount-off discount you
18
+ # might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices),
19
+ # [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents).
20
+ attr_reader :coupon
21
+ # The ID of the customer associated with this discount.
22
+ attr_reader :customer
23
+ # If the coupon has a duration of `repeating`, the date that this discount will end. If the coupon has a duration of `once` or `forever`, this attribute will be null.
24
+ attr_reader :end
25
+ # The ID of the discount object. Discounts cannot be fetched by ID. Use `expand[]=discounts` in API calls to expand discount IDs in an array.
26
+ attr_reader :id
27
+ # The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice.
28
+ attr_reader :invoice
29
+ # The invoice item `id` (or invoice line item `id` for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item.
30
+ attr_reader :invoice_item
31
+ # String representing the object's type. Objects of the same type share the same value.
32
+ attr_reader :object
33
+ # The promotion code applied to create this discount.
34
+ attr_reader :promotion_code
35
+ # Date that the coupon was applied.
36
+ attr_reader :start
37
+ # The subscription that this coupon is applied to, if it is applied to a particular subscription.
38
+ attr_reader :subscription
39
+ # The subscription item that this coupon is applied to, if it is applied to a particular subscription item.
40
+ attr_reader :subscription_item
41
+ # Always true for a deleted object
42
+ attr_reader :deleted
14
43
  end
15
44
  end
@@ -16,6 +16,102 @@ module Stripe
16
16
  "dispute"
17
17
  end
18
18
 
19
+ class Evidence < Stripe::StripeObject
20
+ class EnhancedEvidence < Stripe::StripeObject
21
+ class VisaCompellingEvidence3 < Stripe::StripeObject
22
+ class DisputedTransaction < Stripe::StripeObject
23
+ class ShippingAddress < Stripe::StripeObject
24
+ attr_reader :city, :country, :line1, :line2, :postal_code, :state
25
+ end
26
+ attr_reader :customer_account_id, :customer_device_fingerprint, :customer_device_id, :customer_email_address, :customer_purchase_ip, :merchandise_or_services, :product_description, :shipping_address
27
+ end
28
+
29
+ class PriorUndisputedTransaction < Stripe::StripeObject
30
+ class ShippingAddress < Stripe::StripeObject
31
+ attr_reader :city, :country, :line1, :line2, :postal_code, :state
32
+ end
33
+ attr_reader :charge, :customer_account_id, :customer_device_fingerprint, :customer_device_id, :customer_email_address, :customer_purchase_ip, :product_description, :shipping_address
34
+ end
35
+ attr_reader :disputed_transaction, :prior_undisputed_transactions
36
+ end
37
+
38
+ class VisaCompliance < Stripe::StripeObject
39
+ attr_reader :fee_acknowledged
40
+ end
41
+ attr_reader :visa_compelling_evidence_3, :visa_compliance
42
+ end
43
+ attr_reader :access_activity_log, :billing_address, :cancellation_policy, :cancellation_policy_disclosure, :cancellation_rebuttal, :customer_communication, :customer_email_address, :customer_name, :customer_purchase_ip, :customer_signature, :duplicate_charge_documentation, :duplicate_charge_explanation, :duplicate_charge_id, :enhanced_evidence, :product_description, :receipt, :refund_policy, :refund_policy_disclosure, :refund_refusal_explanation, :service_date, :service_documentation, :shipping_address, :shipping_carrier, :shipping_date, :shipping_documentation, :shipping_tracking_number, :uncategorized_file, :uncategorized_text
44
+ end
45
+
46
+ class EvidenceDetails < Stripe::StripeObject
47
+ class EnhancedEligibility < Stripe::StripeObject
48
+ class VisaCompellingEvidence3 < Stripe::StripeObject
49
+ attr_reader :required_actions, :status
50
+ end
51
+
52
+ class VisaCompliance < Stripe::StripeObject
53
+ attr_reader :status
54
+ end
55
+ attr_reader :visa_compelling_evidence_3, :visa_compliance
56
+ end
57
+ attr_reader :due_by, :enhanced_eligibility, :has_evidence, :past_due, :submission_count
58
+ end
59
+
60
+ class PaymentMethodDetails < Stripe::StripeObject
61
+ class AmazonPay < Stripe::StripeObject
62
+ attr_reader :dispute_type
63
+ end
64
+
65
+ class Card < Stripe::StripeObject
66
+ attr_reader :brand, :case_type, :network_reason_code
67
+ end
68
+
69
+ class Klarna < Stripe::StripeObject
70
+ attr_reader :reason_code
71
+ end
72
+
73
+ class Paypal < Stripe::StripeObject
74
+ attr_reader :case_id, :reason_code
75
+ end
76
+ attr_reader :amazon_pay, :card, :klarna, :paypal, :type
77
+ end
78
+ # Disputed amount. Usually the amount of the charge, but it can differ (usually because of currency fluctuation or because only part of the order is disputed).
79
+ attr_reader :amount
80
+ # List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute.
81
+ attr_reader :balance_transactions
82
+ # ID of the charge that's disputed.
83
+ attr_reader :charge
84
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
85
+ attr_reader :created
86
+ # 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).
87
+ attr_reader :currency
88
+ # List of eligibility types that are included in `enhanced_evidence`.
89
+ attr_reader :enhanced_eligibility_types
90
+ # Attribute for field evidence
91
+ attr_reader :evidence
92
+ # Attribute for field evidence_details
93
+ attr_reader :evidence_details
94
+ # Unique identifier for the object.
95
+ attr_reader :id
96
+ # If true, it's still possible to refund the disputed payment. After the payment has been fully refunded, no further funds are withdrawn from your Stripe account as a result of this dispute.
97
+ attr_reader :is_charge_refundable
98
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
99
+ attr_reader :livemode
100
+ # 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.
101
+ attr_reader :metadata
102
+ # Network-dependent reason code for the dispute.
103
+ attr_reader :network_reason_code
104
+ # String representing the object's type. Objects of the same type share the same value.
105
+ attr_reader :object
106
+ # ID of the PaymentIntent that's disputed.
107
+ attr_reader :payment_intent
108
+ # Attribute for field payment_method_details
109
+ attr_reader :payment_method_details
110
+ # Reason given by cardholder for dispute. Possible values are `bank_cannot_process`, `check_returned`, `credit_not_processed`, `customer_initiated`, `debit_not_authorized`, `duplicate`, `fraudulent`, `general`, `incorrect_account_details`, `insufficient_funds`, `product_not_received`, `product_unacceptable`, `subscription_canceled`, or `unrecognized`. Learn more about [dispute reasons](https://stripe.com/docs/disputes/categories).
111
+ attr_reader :reason
112
+ # Current status of dispute. Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `won`, or `lost`.
113
+ attr_reader :status
114
+
19
115
  # Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost.
20
116
  #
21
117
  # The status of the dispute will change from needs_response to lost. Closing a dispute is irreversible.
@@ -12,6 +12,17 @@ module Stripe
12
12
  "entitlements.active_entitlement"
13
13
  end
14
14
 
15
+ # The [Feature](https://stripe.com/docs/api/entitlements/feature) that the customer is entitled to.
16
+ attr_reader :feature
17
+ # Unique identifier for the object.
18
+ attr_reader :id
19
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
20
+ attr_reader :livemode
21
+ # A unique key you provide as your own system identifier. This may be up to 80 characters.
22
+ attr_reader :lookup_key
23
+ # String representing the object's type. Objects of the same type share the same value.
24
+ attr_reader :object
25
+
15
26
  # Retrieve a list of active entitlements for a customer
16
27
  def self.list(filters = {}, opts = {})
17
28
  request_stripe_object(
@@ -0,0 +1,23 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Entitlements
6
+ # A summary of a customer's active entitlements.
7
+ class ActiveEntitlementSummary < APIResource
8
+ OBJECT_NAME = "entitlements.active_entitlement_summary"
9
+ def self.object_name
10
+ "entitlements.active_entitlement_summary"
11
+ end
12
+
13
+ # The customer that is entitled to this feature.
14
+ attr_reader :customer
15
+ # The list of entitlements this customer has.
16
+ attr_reader :entitlements
17
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
18
+ attr_reader :livemode
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
+ end
@@ -15,6 +15,21 @@ module Stripe
15
15
  "entitlements.feature"
16
16
  end
17
17
 
18
+ # Inactive features cannot be attached to new products and will not be returned from the features list endpoint.
19
+ attr_reader :active
20
+ # Unique identifier for the object.
21
+ attr_reader :id
22
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
23
+ attr_reader :livemode
24
+ # A unique key you provide as your own system identifier. This may be up to 80 characters.
25
+ attr_reader :lookup_key
26
+ # Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
27
+ attr_reader :metadata
28
+ # The feature's name, for your own purpose, not meant to be displayable to the customer.
29
+ attr_reader :name
30
+ # String representing the object's type. Objects of the same type share the same value.
31
+ attr_reader :object
32
+
18
33
  # Creates a feature
19
34
  def self.create(params = {}, opts = {})
20
35
  request_stripe_object(
@@ -11,6 +11,19 @@ module Stripe
11
11
  "ephemeral_key"
12
12
  end
13
13
 
14
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
15
+ attr_reader :created
16
+ # Time at which the key will expire. Measured in seconds since the Unix epoch.
17
+ attr_reader :expires
18
+ # Unique identifier for the object.
19
+ attr_reader :id
20
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
21
+ attr_reader :livemode
22
+ # String representing the object's type. Objects of the same type share the same value.
23
+ attr_reader :object
24
+ # The key's secret. You can use this value to make authorized requests to the Stripe API.
25
+ attr_reader :secret
26
+
14
27
  # Invalidates a short-lived API key for a given resource.
15
28
  def self.delete(id, params = {}, opts = {})
16
29
  request_stripe_object(
@@ -40,6 +40,50 @@ module Stripe
40
40
  "event"
41
41
  end
42
42
 
43
+ class Data < Stripe::StripeObject
44
+ attr_reader :object, :previous_attributes
45
+ end
46
+
47
+ class Reason < Stripe::StripeObject
48
+ class AutomationAction < Stripe::StripeObject
49
+ class StripeSendWebhookCustomEvent < Stripe::StripeObject
50
+ attr_reader :custom_data
51
+ end
52
+ attr_reader :stripe_send_webhook_custom_event, :trigger, :type
53
+ end
54
+
55
+ class Request < Stripe::StripeObject
56
+ attr_reader :id, :idempotency_key
57
+ end
58
+ attr_reader :automation_action, :request, :type
59
+ end
60
+
61
+ class Request < Stripe::StripeObject
62
+ attr_reader :id, :idempotency_key
63
+ end
64
+ # The connected account that originates the event.
65
+ attr_reader :account
66
+ # The Stripe API version used to render `data`. This property is populated only for events on or after October 31, 2014.
67
+ attr_reader :api_version
68
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
69
+ attr_reader :created
70
+ # Attribute for field data
71
+ attr_reader :data
72
+ # Unique identifier for the object.
73
+ attr_reader :id
74
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
75
+ attr_reader :livemode
76
+ # String representing the object's type. Objects of the same type share the same value.
77
+ attr_reader :object
78
+ # Number of webhooks that haven't been successfully delivered (for example, to return a 20x response) to the URLs you specify.
79
+ attr_reader :pending_webhooks
80
+ # Information about the action that causes the event. Only present when the event is triggered by an API request or an [Automation](https://docs.stripe.com/billing/automations) action.
81
+ attr_reader :reason
82
+ # Information on the API request that triggers the event.
83
+ attr_reader :request
84
+ # Description of the event (for example, `invoice.created` or `charge.refunded`).
85
+ attr_reader :type
86
+
43
87
  # List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object](https://docs.stripe.com/api/events/object) api_version attribute (not according to your current Stripe API version or Stripe-Version header).
44
88
  def self.list(filters = {}, opts = {})
45
89
  request_stripe_object(method: :get, path: "/v1/events", params: filters, opts: opts)
@@ -36,6 +36,13 @@ module Stripe
36
36
  "exchange_rate"
37
37
  end
38
38
 
39
+ # Unique identifier for the object. Represented as the three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) in lowercase.
40
+ attr_reader :id
41
+ # String representing the object's type. Objects of the same type share the same value.
42
+ attr_reader :object
43
+ # Hash where the keys are supported currencies and the values are the exchange rate at which the base id currency converts to the key currency.
44
+ attr_reader :rates
45
+
39
46
  # Returns a list of objects that contain the rates at which foreign currencies are converted to one another. Only shows the currencies for which Stripe supports.
40
47
  def self.list(filters = {}, opts = {})
41
48
  request_stripe_object(method: :get, path: "/v1/exchange_rates", params: filters, opts: opts)
@@ -18,6 +18,29 @@ module Stripe
18
18
  "file"
19
19
  end
20
20
 
21
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
22
+ attr_reader :created
23
+ # The file expires and isn't available at this time in epoch seconds.
24
+ attr_reader :expires_at
25
+ # The suitable name for saving the file to a filesystem.
26
+ attr_reader :filename
27
+ # Unique identifier for the object.
28
+ attr_reader :id
29
+ # A list of [file links](https://stripe.com/docs/api#file_links) that point at this file.
30
+ attr_reader :links
31
+ # String representing the object's type. Objects of the same type share the same value.
32
+ attr_reader :object
33
+ # The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file.
34
+ attr_reader :purpose
35
+ # The size of the file object in bytes.
36
+ attr_reader :size
37
+ # A suitable title for the document.
38
+ attr_reader :title
39
+ # The returned file type (for example, `csv`, `pdf`, `jpg`, or `png`).
40
+ attr_reader :type
41
+ # Use your live secret API key to download the file from this URL.
42
+ attr_reader :url
43
+
21
44
  # To upload a file to Stripe, you need to send a request of type multipart/form-data. Include the file you want to upload in the request, and the parameters for creating a file.
22
45
  #
23
46
  # All of Stripe's officially supported Client libraries support sending multipart/form-data.
@@ -15,6 +15,25 @@ module Stripe
15
15
  "file_link"
16
16
  end
17
17
 
18
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
19
+ attr_reader :created
20
+ # Returns if the link is already expired.
21
+ attr_reader :expired
22
+ # Time that the link expires.
23
+ attr_reader :expires_at
24
+ # The file object this link points to.
25
+ attr_reader :file
26
+ # Unique identifier for the object.
27
+ attr_reader :id
28
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
29
+ attr_reader :livemode
30
+ # 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.
31
+ attr_reader :metadata
32
+ # String representing the object's type. Objects of the same type share the same value.
33
+ attr_reader :object
34
+ # The publicly accessible URL to download the file.
35
+ attr_reader :url
36
+
18
37
  # Creates a new file link object.
19
38
  def self.create(params = {}, opts = {})
20
39
  request_stripe_object(method: :post, path: "/v1/file_links", params: params, opts: opts)
@@ -15,6 +15,90 @@ module Stripe
15
15
 
16
16
  nested_resource_class_methods :inferred_balance, operations: %i[list]
17
17
 
18
+ class AccountHolder < Stripe::StripeObject
19
+ attr_reader :account, :customer, :type
20
+ end
21
+
22
+ class Balance < Stripe::StripeObject
23
+ class Cash < Stripe::StripeObject
24
+ attr_reader :available
25
+ end
26
+
27
+ class Credit < Stripe::StripeObject
28
+ attr_reader :used
29
+ end
30
+ attr_reader :as_of, :cash, :credit, :current, :type
31
+ end
32
+
33
+ class BalanceRefresh < Stripe::StripeObject
34
+ attr_reader :last_attempted_at, :next_refresh_available_at, :status
35
+ end
36
+
37
+ class InferredBalancesRefresh < Stripe::StripeObject
38
+ attr_reader :last_attempted_at, :next_refresh_available_at, :status
39
+ end
40
+
41
+ class OwnershipRefresh < Stripe::StripeObject
42
+ attr_reader :last_attempted_at, :next_refresh_available_at, :status
43
+ end
44
+
45
+ class TransactionRefresh < Stripe::StripeObject
46
+ attr_reader :id, :last_attempted_at, :next_refresh_available_at, :status
47
+ end
48
+ # The account holder that this account belongs to.
49
+ attr_reader :account_holder
50
+ # The most recent information about the account's balance.
51
+ attr_reader :balance
52
+ # The state of the most recent attempt to refresh the account balance.
53
+ attr_reader :balance_refresh
54
+ # The type of the account. Account category is further divided in `subcategory`.
55
+ attr_reader :category
56
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
57
+ attr_reader :created
58
+ # A human-readable name that has been assigned to this account, either by the account holder or by the institution.
59
+ attr_reader :display_name
60
+ # Unique identifier for the object.
61
+ attr_reader :id
62
+ # The state of the most recent attempt to refresh the account's inferred balance history.
63
+ attr_reader :inferred_balances_refresh
64
+ # The name of the institution that holds this account.
65
+ attr_reader :institution_name
66
+ # The last 4 digits of the account number. If present, this will be 4 numeric characters.
67
+ attr_reader :last4
68
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
69
+ attr_reader :livemode
70
+ # String representing the object's type. Objects of the same type share the same value.
71
+ attr_reader :object
72
+ # The most recent information about the account's owners.
73
+ attr_reader :ownership
74
+ # The state of the most recent attempt to refresh the account owners.
75
+ attr_reader :ownership_refresh
76
+ # The list of permissions granted by this account.
77
+ attr_reader :permissions
78
+ # The status of the link to the account.
79
+ attr_reader :status
80
+ # If `category` is `cash`, one of:
81
+ #
82
+ # - `checking`
83
+ # - `savings`
84
+ # - `other`
85
+ #
86
+ # If `category` is `credit`, one of:
87
+ #
88
+ # - `mortgage`
89
+ # - `line_of_credit`
90
+ # - `credit_card`
91
+ # - `other`
92
+ #
93
+ # If `category` is `investment` or `other`, this will be `other`.
94
+ attr_reader :subcategory
95
+ # The list of data refresh subscriptions requested on this account.
96
+ attr_reader :subscriptions
97
+ # The [PaymentMethod type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type)(s) that can be created from this account.
98
+ attr_reader :supported_payment_method_types
99
+ # The state of the most recent attempt to refresh the account transactions.
100
+ attr_reader :transaction_refresh
101
+
18
102
  # Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).
19
103
  def disconnect(params = {}, opts = {})
20
104
  request_stripe_object(
@@ -9,6 +9,19 @@ module Stripe
9
9
  def self.object_name
10
10
  "financial_connections.account_inferred_balance"
11
11
  end
12
+
13
+ # The time for which this balance was calculated, measured in seconds since the Unix epoch. If the balance was computed by Stripe and not provided directly by a financial institution, it will always be 23:59:59 UTC.
14
+ attr_reader :as_of
15
+ # The balances owed to (or by) the account holder, before subtracting any outbound pending transactions or adding any inbound pending transactions.
16
+ #
17
+ # Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
18
+ #
19
+ # Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder.
20
+ attr_reader :current
21
+ # Unique identifier for the object.
22
+ attr_reader :id
23
+ # String representing the object's type. Objects of the same type share the same value.
24
+ attr_reader :object
12
25
  end
13
26
  end
14
27
  end
@@ -9,6 +9,23 @@ module Stripe
9
9
  def self.object_name
10
10
  "financial_connections.account_owner"
11
11
  end
12
+
13
+ # The email address of the owner.
14
+ attr_reader :email
15
+ # Unique identifier for the object.
16
+ attr_reader :id
17
+ # The full name of the owner.
18
+ attr_reader :name
19
+ # String representing the object's type. Objects of the same type share the same value.
20
+ attr_reader :object
21
+ # The ownership object that this owner belongs to.
22
+ attr_reader :ownership
23
+ # The raw phone number of the owner.
24
+ attr_reader :phone
25
+ # The raw physical address of the owner.
26
+ attr_reader :raw_address
27
+ # The timestamp of the refresh that updated this owner.
28
+ attr_reader :refreshed_at
12
29
  end
13
30
  end
14
31
  end
@@ -9,6 +9,15 @@ module Stripe
9
9
  def self.object_name
10
10
  "financial_connections.account_ownership"
11
11
  end
12
+
13
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
14
+ attr_reader :created
15
+ # Unique identifier for the object.
16
+ attr_reader :id
17
+ # String representing the object's type. Objects of the same type share the same value.
18
+ attr_reader :object
19
+ # A paginated list of owners for this account.
20
+ attr_reader :owners
12
21
  end
13
22
  end
14
23
  end