stripe 13.2.0 → 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 (225) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +1396 -645
  3. data/OPENAPI_VERSION +1 -1
  4. data/VERSION +1 -1
  5. data/lib/stripe/object_types.rb +32 -0
  6. data/lib/stripe/request_signing_authenticator.rb +79 -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 +60 -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 +45 -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 +94 -0
  33. data/lib/stripe/resources/capital/financing_summary.rb +32 -0
  34. data/lib/stripe/resources/capital/financing_transaction.rb +56 -0
  35. data/lib/stripe/resources/card.rb +72 -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 +88 -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 +87 -0
  63. data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +27 -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 +61 -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 +96 -0
  72. data/lib/stripe/resources/gift_cards/transaction.rb +132 -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 +418 -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 +46 -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 +145 -0
  84. data/lib/stripe/resources/issuing/dispute.rb +65 -0
  85. data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +49 -0
  86. data/lib/stripe/resources/issuing/fraud_liability_debit.rb +43 -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 +56 -0
  96. data/lib/stripe/resources/order.rb +322 -0
  97. data/lib/stripe/resources/payment_attempt_record.rb +100 -0
  98. data/lib/stripe/resources/payment_intent.rb +712 -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 +194 -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 +356 -0
  112. data/lib/stripe/resources/quote_line.rb +136 -0
  113. data/lib/stripe/resources/quote_preview_invoice.rb +374 -0
  114. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +170 -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 +195 -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 +173 -0
  134. data/lib/stripe/resources/tax/association.rb +60 -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 +124 -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 +178 -0
  150. data/lib/stripe/resources/terminal/reader_collected_data.rb +30 -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 +31 -0
  176. data/lib/stripe/services/account_notice_service.rb +39 -0
  177. data/lib/stripe/services/billing/credit_balance_summary_service.rb +1 -1
  178. data/lib/stripe/services/billing/credit_balance_transaction_service.rb +2 -2
  179. data/lib/stripe/services/billing/credit_grant_service.rb +3 -3
  180. data/lib/stripe/services/billing/meter_event_adjustment_service.rb +1 -1
  181. data/lib/stripe/services/billing/meter_event_service.rb +1 -1
  182. data/lib/stripe/services/billing/meter_service.rb +5 -5
  183. data/lib/stripe/services/capital/financing_offer_service.rb +42 -0
  184. data/lib/stripe/services/capital/financing_summary_service.rb +19 -0
  185. data/lib/stripe/services/capital/financing_transaction_service.rb +31 -0
  186. data/lib/stripe/services/capital_service.rb +15 -0
  187. data/lib/stripe/services/financial_connections/account_inferred_balance_service.rb +19 -0
  188. data/lib/stripe/services/financial_connections/account_service.rb +3 -1
  189. data/lib/stripe/services/financial_connections/institution_service.rb +30 -0
  190. data/lib/stripe/services/financial_connections_service.rb +2 -1
  191. data/lib/stripe/services/gift_cards/card_service.rb +63 -0
  192. data/lib/stripe/services/gift_cards/transaction_service.rb +74 -0
  193. data/lib/stripe/services/gift_cards_service.rb +14 -0
  194. data/lib/stripe/services/invoice_payment_service.rb +28 -0
  195. data/lib/stripe/services/invoice_service.rb +44 -1
  196. data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +74 -0
  197. data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +30 -0
  198. data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +30 -0
  199. data/lib/stripe/services/issuing_service.rb +5 -1
  200. data/lib/stripe/services/margin_service.rb +50 -0
  201. data/lib/stripe/services/order_line_item_service.rb +17 -0
  202. data/lib/stripe/services/order_service.rb +78 -0
  203. data/lib/stripe/services/payment_attempt_record_service.rb +28 -0
  204. data/lib/stripe/services/payment_intent_service.rb +37 -0
  205. data/lib/stripe/services/payment_record_service.rb +78 -0
  206. data/lib/stripe/services/quote_line_service.rb +17 -0
  207. data/lib/stripe/services/quote_preview_invoice_service.rb +17 -0
  208. data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +17 -0
  209. data/lib/stripe/services/quote_service.rb +49 -1
  210. data/lib/stripe/services/subscription_schedule_service.rb +11 -0
  211. data/lib/stripe/services/tax/association_service.rb +19 -0
  212. data/lib/stripe/services/tax/form_service.rb +37 -0
  213. data/lib/stripe/services/tax_service.rb +3 -1
  214. data/lib/stripe/services/terminal/reader_collected_data_service.rb +19 -0
  215. data/lib/stripe/services/terminal/reader_service.rb +33 -0
  216. data/lib/stripe/services/terminal_service.rb +2 -1
  217. data/lib/stripe/services/v1_services.rb +8 -1
  218. data/lib/stripe/services.rb +25 -0
  219. data/lib/stripe/stripe_configuration.rb +3 -1
  220. data/lib/stripe/stripe_object.rb +5 -0
  221. data/lib/stripe/util.rb +7 -1
  222. data/lib/stripe/version.rb +1 -1
  223. data/lib/stripe.rb +45 -0
  224. data/stripe.gemspec +2 -1
  225. metadata +62 -4
@@ -13,5 +13,18 @@ module Stripe
13
13
  def self.object_name
14
14
  "usage_record"
15
15
  end
16
+
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
+ # String representing the object's type. Objects of the same type share the same value.
22
+ attr_reader :object
23
+ # The usage quantity for the specified date.
24
+ attr_reader :quantity
25
+ # The ID of the subscription item this usage record contains data for.
26
+ attr_reader :subscription_item
27
+ # The timestamp when this usage occurred.
28
+ attr_reader :timestamp
16
29
  end
17
30
  end
@@ -8,5 +8,23 @@ module Stripe
8
8
  def self.object_name
9
9
  "usage_record_summary"
10
10
  end
11
+
12
+ class Period < Stripe::StripeObject
13
+ attr_reader :end, :start
14
+ end
15
+ # Unique identifier for the object.
16
+ attr_reader :id
17
+ # The invoice in which this usage period has been billed for.
18
+ attr_reader :invoice
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
+ # String representing the object's type. Objects of the same type share the same value.
22
+ attr_reader :object
23
+ # Attribute for field period
24
+ attr_reader :period
25
+ # The ID of the subscription item this summary is describing.
26
+ attr_reader :subscription_item
27
+ # The total usage within this usage period.
28
+ attr_reader :total_usage
11
29
  end
12
30
  end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stripe
4
+ module V2
5
+ class Amount
6
+ attr_reader :value, :currency
7
+ end
8
+ end
9
+ end
@@ -10,6 +10,24 @@ module Stripe
10
10
  def self.object_name
11
11
  "v2.billing.meter_event"
12
12
  end
13
+
14
+ # The creation time of this meter event.
15
+ attr_reader :created
16
+ # The name of the meter event. Corresponds with the `event_name` field on a meter.
17
+ attr_reader :event_name
18
+ # A unique identifier for the event. If not provided, one will be generated. We recommend using a globally unique identifier for this. We’ll enforce uniqueness within a rolling 24 hour period.
19
+ attr_reader :identifier
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 of the object field.
23
+ attr_reader :object
24
+ # The payload of the event. This must contain the fields corresponding to a meter’s
25
+ # `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and
26
+ # `value_settings.event_payload_key` (default is `value`). Read more about the payload.
27
+ attr_reader :payload
28
+ # The time of the event. Must be within the past 35 calendar days or up to
29
+ # 5 minutes in the future. Defaults to current timestamp if not specified.
30
+ attr_reader :timestamp
13
31
  end
14
32
  end
15
33
  end
@@ -9,6 +9,26 @@ module Stripe
9
9
  def self.object_name
10
10
  "v2.billing.meter_event_adjustment"
11
11
  end
12
+
13
+ class Cancel < Stripe::StripeObject
14
+ attr_reader :identifier
15
+ end
16
+ # Specifies which event to cancel.
17
+ attr_reader :cancel
18
+ # The time the adjustment was created.
19
+ attr_reader :created
20
+ # The name of the meter event. Corresponds with the `event_name` field on a meter.
21
+ attr_reader :event_name
22
+ # The unique id of this meter event adjustment.
23
+ attr_reader :id
24
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
25
+ attr_reader :livemode
26
+ # String representing the object's type. Objects of the same type share the same value of the object field.
27
+ attr_reader :object
28
+ # Open Enum. The meter event adjustment’s status.
29
+ attr_reader :status
30
+ # Open Enum. Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet.
31
+ attr_reader :type
12
32
  end
13
33
  end
14
34
  end
@@ -9,6 +9,20 @@ module Stripe
9
9
  def self.object_name
10
10
  "v2.billing.meter_event_session"
11
11
  end
12
+
13
+ # The authentication token for this session. Use this token when calling the
14
+ # high-throughput meter event API.
15
+ attr_reader :authentication_token
16
+ # The creation time of this session.
17
+ attr_reader :created
18
+ # The time at which this session will expire.
19
+ attr_reader :expires_at
20
+ # The unique id of this auth session.
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
+ # String representing the object's type. Objects of the same type share the same value of the object field.
25
+ attr_reader :object
12
26
  end
13
27
  end
14
28
  end
@@ -8,6 +8,27 @@ module Stripe
8
8
  def self.object_name
9
9
  "v2.core.event"
10
10
  end
11
+
12
+ class Reason < Stripe::StripeObject
13
+ class Request < Stripe::StripeObject
14
+ attr_reader :id, :idempotency_key
15
+ end
16
+ attr_reader :type, :request
17
+ end
18
+ # Authentication context needed to fetch the event or related object.
19
+ attr_reader :context
20
+ # Time at which the object was created.
21
+ attr_reader :created
22
+ # Unique identifier for the event.
23
+ attr_reader :id
24
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
25
+ attr_reader :livemode
26
+ # String representing the object's type. Objects of the same type share the same value of the object field.
27
+ attr_reader :object
28
+ # Reason for the event.
29
+ attr_reader :reason
30
+ # The type of the event.
31
+ attr_reader :type
11
32
  end
12
33
  end
13
34
  end
@@ -8,6 +8,55 @@ module Stripe
8
8
  def self.object_name
9
9
  "v2.core.event_destination"
10
10
  end
11
+
12
+ class StatusDetails < Stripe::StripeObject
13
+ class Disabled < Stripe::StripeObject
14
+ attr_reader :reason
15
+ end
16
+ attr_reader :disabled
17
+ end
18
+
19
+ class AmazonEventbridge < Stripe::StripeObject
20
+ attr_reader :aws_account_id, :aws_event_source_arn, :aws_event_source_status
21
+ end
22
+
23
+ class WebhookEndpoint < Stripe::StripeObject
24
+ attr_reader :signing_secret, :url
25
+ end
26
+ # Time at which the object was created.
27
+ attr_reader :created
28
+ # An optional description of what the event destination is used for.
29
+ attr_reader :description
30
+ # The list of events to enable for this endpoint.
31
+ attr_reader :enabled_events
32
+ # Payload type of events being subscribed to.
33
+ attr_reader :event_payload
34
+ # Where events should be routed from.
35
+ attr_reader :events_from
36
+ # Unique identifier for the object.
37
+ attr_reader :id
38
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
39
+ attr_reader :livemode
40
+ # Metadata.
41
+ attr_reader :metadata
42
+ # Event destination name.
43
+ attr_reader :name
44
+ # String representing the object's type. Objects of the same type share the same value of the object field.
45
+ attr_reader :object
46
+ # If using the snapshot event payload, the API version events are rendered as.
47
+ attr_reader :snapshot_api_version
48
+ # Status. It can be set to either enabled or disabled.
49
+ attr_reader :status
50
+ # Additional information about event destination status.
51
+ attr_reader :status_details
52
+ # Event destination type.
53
+ attr_reader :type
54
+ # Time at which the object was last updated.
55
+ attr_reader :updated
56
+ # Amazon EventBridge configuration.
57
+ attr_reader :amazon_eventbridge
58
+ # Webhook endpoint configuration.
59
+ attr_reader :webhook_endpoint
11
60
  end
12
61
  end
13
62
  end
@@ -20,6 +20,33 @@ module Stripe
20
20
  "webhook_endpoint"
21
21
  end
22
22
 
23
+ # The API version events are rendered as for this webhook endpoint.
24
+ attr_reader :api_version
25
+ # The ID of the associated Connect application.
26
+ attr_reader :application
27
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
28
+ attr_reader :created
29
+ # An optional description of what the webhook is used for.
30
+ attr_reader :description
31
+ # The list of events to enable for this endpoint. `['*']` indicates that all events are enabled, except those that require explicit selection.
32
+ attr_reader :enabled_events
33
+ # Unique identifier for the object.
34
+ attr_reader :id
35
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
36
+ attr_reader :livemode
37
+ # 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.
38
+ attr_reader :metadata
39
+ # String representing the object's type. Objects of the same type share the same value.
40
+ attr_reader :object
41
+ # The endpoint's secret, used to generate [webhook signatures](https://docs.stripe.com/webhooks/signatures). Only returned at creation.
42
+ attr_reader :secret
43
+ # The status of the webhook. It can be `enabled` or `disabled`.
44
+ attr_reader :status
45
+ # The URL of the webhook endpoint.
46
+ attr_reader :url
47
+ # Always true for a deleted object
48
+ attr_reader :deleted
49
+
23
50
  # A webhook endpoint must have a url and a list of enabled_events. You may optionally specify the Boolean connect parameter. If set to true, then a Connect webhook endpoint that notifies the specified url about events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specified url only about events from your account is created. You can also create webhook endpoints in the [webhooks settings](https://dashboard.stripe.com/account/webhooks) section of the Dashboard.
24
51
  def self.create(params = {}, opts = {})
25
52
  request_stripe_object(
@@ -3,8 +3,10 @@
3
3
 
4
4
  require "stripe/resources/account"
5
5
  require "stripe/resources/account_link"
6
+ require "stripe/resources/account_notice"
6
7
  require "stripe/resources/account_session"
7
8
  require "stripe/resources/apple_pay_domain"
9
+ require "stripe/resources/application"
8
10
  require "stripe/resources/application_fee"
9
11
  require "stripe/resources/application_fee_refund"
10
12
  require "stripe/resources/apps/secret"
@@ -12,16 +14,21 @@ require "stripe/resources/balance"
12
14
  require "stripe/resources/balance_transaction"
13
15
  require "stripe/resources/bank_account"
14
16
  require "stripe/resources/billing/alert"
17
+ require "stripe/resources/billing/alert_triggered"
15
18
  require "stripe/resources/billing/credit_balance_summary"
16
19
  require "stripe/resources/billing/credit_balance_transaction"
17
20
  require "stripe/resources/billing/credit_grant"
18
21
  require "stripe/resources/billing/meter"
22
+ require "stripe/resources/billing/meter_error_report"
19
23
  require "stripe/resources/billing/meter_event"
20
24
  require "stripe/resources/billing/meter_event_adjustment"
21
25
  require "stripe/resources/billing/meter_event_summary"
22
26
  require "stripe/resources/billing_portal/configuration"
23
27
  require "stripe/resources/billing_portal/session"
24
28
  require "stripe/resources/capability"
29
+ require "stripe/resources/capital/financing_offer"
30
+ require "stripe/resources/capital/financing_summary"
31
+ require "stripe/resources/capital/financing_transaction"
25
32
  require "stripe/resources/card"
26
33
  require "stripe/resources/cash_balance"
27
34
  require "stripe/resources/charge"
@@ -30,6 +37,7 @@ require "stripe/resources/climate/order"
30
37
  require "stripe/resources/climate/product"
31
38
  require "stripe/resources/climate/supplier"
32
39
  require "stripe/resources/confirmation_token"
40
+ require "stripe/resources/connect_collection_transfer"
33
41
  require "stripe/resources/country_spec"
34
42
  require "stripe/resources/coupon"
35
43
  require "stripe/resources/credit_note"
@@ -41,6 +49,7 @@ require "stripe/resources/customer_session"
41
49
  require "stripe/resources/discount"
42
50
  require "stripe/resources/dispute"
43
51
  require "stripe/resources/entitlements/active_entitlement"
52
+ require "stripe/resources/entitlements/active_entitlement_summary"
44
53
  require "stripe/resources/entitlements/feature"
45
54
  require "stripe/resources/ephemeral_key"
46
55
  require "stripe/resources/event"
@@ -48,34 +57,47 @@ require "stripe/resources/exchange_rate"
48
57
  require "stripe/resources/file"
49
58
  require "stripe/resources/file_link"
50
59
  require "stripe/resources/financial_connections/account"
60
+ require "stripe/resources/financial_connections/account_inferred_balance"
51
61
  require "stripe/resources/financial_connections/account_owner"
52
62
  require "stripe/resources/financial_connections/account_ownership"
63
+ require "stripe/resources/financial_connections/institution"
53
64
  require "stripe/resources/financial_connections/session"
54
65
  require "stripe/resources/financial_connections/transaction"
55
66
  require "stripe/resources/forwarding/request"
56
67
  require "stripe/resources/funding_instructions"
68
+ require "stripe/resources/gift_cards/card"
69
+ require "stripe/resources/gift_cards/transaction"
57
70
  require "stripe/resources/identity/verification_report"
58
71
  require "stripe/resources/identity/verification_session"
59
72
  require "stripe/resources/invoice"
60
73
  require "stripe/resources/invoice_item"
61
74
  require "stripe/resources/invoice_line_item"
75
+ require "stripe/resources/invoice_payment"
62
76
  require "stripe/resources/invoice_rendering_template"
63
77
  require "stripe/resources/issuing/authorization"
64
78
  require "stripe/resources/issuing/card"
65
79
  require "stripe/resources/issuing/cardholder"
80
+ require "stripe/resources/issuing/credit_underwriting_record"
66
81
  require "stripe/resources/issuing/dispute"
82
+ require "stripe/resources/issuing/dispute_settlement_detail"
83
+ require "stripe/resources/issuing/fraud_liability_debit"
67
84
  require "stripe/resources/issuing/personalization_design"
68
85
  require "stripe/resources/issuing/physical_bundle"
86
+ require "stripe/resources/issuing/settlement"
69
87
  require "stripe/resources/issuing/token"
70
88
  require "stripe/resources/issuing/transaction"
71
89
  require "stripe/resources/line_item"
72
90
  require "stripe/resources/login_link"
73
91
  require "stripe/resources/mandate"
92
+ require "stripe/resources/margin"
93
+ require "stripe/resources/order"
94
+ require "stripe/resources/payment_attempt_record"
74
95
  require "stripe/resources/payment_intent"
75
96
  require "stripe/resources/payment_link"
76
97
  require "stripe/resources/payment_method"
77
98
  require "stripe/resources/payment_method_configuration"
78
99
  require "stripe/resources/payment_method_domain"
100
+ require "stripe/resources/payment_record"
79
101
  require "stripe/resources/payout"
80
102
  require "stripe/resources/person"
81
103
  require "stripe/resources/plan"
@@ -84,12 +106,16 @@ require "stripe/resources/product"
84
106
  require "stripe/resources/product_feature"
85
107
  require "stripe/resources/promotion_code"
86
108
  require "stripe/resources/quote"
109
+ require "stripe/resources/quote_line"
110
+ require "stripe/resources/quote_preview_invoice"
111
+ require "stripe/resources/quote_preview_subscription_schedule"
87
112
  require "stripe/resources/radar/early_fraud_warning"
88
113
  require "stripe/resources/radar/value_list"
89
114
  require "stripe/resources/radar/value_list_item"
90
115
  require "stripe/resources/refund"
91
116
  require "stripe/resources/reporting/report_run"
92
117
  require "stripe/resources/reporting/report_type"
118
+ require "stripe/resources/reserve_transaction"
93
119
  require "stripe/resources/reversal"
94
120
  require "stripe/resources/review"
95
121
  require "stripe/resources/setup_attempt"
@@ -97,23 +123,28 @@ require "stripe/resources/setup_intent"
97
123
  require "stripe/resources/shipping_rate"
98
124
  require "stripe/resources/sigma/scheduled_query_run"
99
125
  require "stripe/resources/source"
126
+ require "stripe/resources/source_mandate_notification"
100
127
  require "stripe/resources/source_transaction"
101
128
  require "stripe/resources/subscription"
102
129
  require "stripe/resources/subscription_item"
103
130
  require "stripe/resources/subscription_schedule"
131
+ require "stripe/resources/tax/association"
104
132
  require "stripe/resources/tax/calculation"
105
133
  require "stripe/resources/tax/calculation_line_item"
134
+ require "stripe/resources/tax/form"
106
135
  require "stripe/resources/tax/registration"
107
136
  require "stripe/resources/tax/settings"
108
137
  require "stripe/resources/tax/transaction"
109
138
  require "stripe/resources/tax/transaction_line_item"
110
139
  require "stripe/resources/tax_code"
140
+ require "stripe/resources/tax_deducted_at_source"
111
141
  require "stripe/resources/tax_id"
112
142
  require "stripe/resources/tax_rate"
113
143
  require "stripe/resources/terminal/configuration"
114
144
  require "stripe/resources/terminal/connection_token"
115
145
  require "stripe/resources/terminal/location"
116
146
  require "stripe/resources/terminal/reader"
147
+ require "stripe/resources/terminal/reader_collected_data"
117
148
  require "stripe/resources/test_helpers/test_clock"
118
149
  require "stripe/resources/token"
119
150
  require "stripe/resources/topup"
@@ -0,0 +1,39 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ class AccountNoticeService < StripeService
6
+ # Retrieves a list of AccountNotice objects. The objects are sorted in descending order by creation date, with the most-recently-created object appearing first.
7
+ def list(params = {}, opts = {})
8
+ request(
9
+ method: :get,
10
+ path: "/v1/account_notices",
11
+ params: params,
12
+ opts: opts,
13
+ base_address: :api
14
+ )
15
+ end
16
+
17
+ # Retrieves an AccountNotice object.
18
+ def retrieve(account_notice, params = {}, opts = {})
19
+ request(
20
+ method: :get,
21
+ path: format("/v1/account_notices/%<account_notice>s", { account_notice: CGI.escape(account_notice) }),
22
+ params: params,
23
+ opts: opts,
24
+ base_address: :api
25
+ )
26
+ end
27
+
28
+ # Updates an AccountNotice object.
29
+ def update(account_notice, params = {}, opts = {})
30
+ request(
31
+ method: :post,
32
+ path: format("/v1/account_notices/%<account_notice>s", { account_notice: CGI.escape(account_notice) }),
33
+ params: params,
34
+ opts: opts,
35
+ base_address: :api
36
+ )
37
+ end
38
+ end
39
+ end
@@ -4,7 +4,7 @@
4
4
  module Stripe
5
5
  module Billing
6
6
  class CreditBalanceSummaryService < StripeService
7
- # Retrieves the credit balance summary for a customer
7
+ # Retrieves the credit balance summary for a customer.
8
8
  def retrieve(params = {}, opts = {})
9
9
  request(
10
10
  method: :get,
@@ -4,7 +4,7 @@
4
4
  module Stripe
5
5
  module Billing
6
6
  class CreditBalanceTransactionService < StripeService
7
- # Retrieve a list of credit balance transactions
7
+ # Retrieve a list of credit balance transactions.
8
8
  def list(params = {}, opts = {})
9
9
  request(
10
10
  method: :get,
@@ -15,7 +15,7 @@ module Stripe
15
15
  )
16
16
  end
17
17
 
18
- # Retrieves a credit balance transaction
18
+ # Retrieves a credit balance transaction.
19
19
  def retrieve(id, params = {}, opts = {})
20
20
  request(
21
21
  method: :get,
@@ -4,7 +4,7 @@
4
4
  module Stripe
5
5
  module Billing
6
6
  class CreditGrantService < StripeService
7
- # Creates a credit grant
7
+ # Creates a credit grant.
8
8
  def create(params = {}, opts = {})
9
9
  request(
10
10
  method: :post,
@@ -37,7 +37,7 @@ module Stripe
37
37
  )
38
38
  end
39
39
 
40
- # Retrieves a credit grant
40
+ # Retrieves a credit grant.
41
41
  def retrieve(id, params = {}, opts = {})
42
42
  request(
43
43
  method: :get,
@@ -48,7 +48,7 @@ module Stripe
48
48
  )
49
49
  end
50
50
 
51
- # Updates a credit grant
51
+ # Updates a credit grant.
52
52
  def update(id, params = {}, opts = {})
53
53
  request(
54
54
  method: :post,
@@ -4,7 +4,7 @@
4
4
  module Stripe
5
5
  module Billing
6
6
  class MeterEventAdjustmentService < StripeService
7
- # Creates a billing meter event adjustment
7
+ # Creates a billing meter event adjustment.
8
8
  def create(params = {}, opts = {})
9
9
  request(
10
10
  method: :post,
@@ -4,7 +4,7 @@
4
4
  module Stripe
5
5
  module Billing
6
6
  class MeterEventService < StripeService
7
- # Creates a billing meter event
7
+ # Creates a billing meter event.
8
8
  def create(params = {}, opts = {})
9
9
  request(
10
10
  method: :post,
@@ -11,7 +11,7 @@ module Stripe
11
11
  @event_summaries = Stripe::Billing::MeterEventSummaryService.new(@requestor)
12
12
  end
13
13
 
14
- # Creates a billing meter
14
+ # Creates a billing meter.
15
15
  def create(params = {}, opts = {})
16
16
  request(
17
17
  method: :post,
@@ -22,7 +22,7 @@ module Stripe
22
22
  )
23
23
  end
24
24
 
25
- # Deactivates a billing meter
25
+ # When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price.
26
26
  def deactivate(id, params = {}, opts = {})
27
27
  request(
28
28
  method: :post,
@@ -44,7 +44,7 @@ module Stripe
44
44
  )
45
45
  end
46
46
 
47
- # Reactivates a billing meter
47
+ # When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price.
48
48
  def reactivate(id, params = {}, opts = {})
49
49
  request(
50
50
  method: :post,
@@ -55,7 +55,7 @@ module Stripe
55
55
  )
56
56
  end
57
57
 
58
- # Retrieves a billing meter given an ID
58
+ # Retrieves a billing meter given an ID.
59
59
  def retrieve(id, params = {}, opts = {})
60
60
  request(
61
61
  method: :get,
@@ -66,7 +66,7 @@ module Stripe
66
66
  )
67
67
  end
68
68
 
69
- # Updates a billing meter
69
+ # Updates a billing meter.
70
70
  def update(id, params = {}, opts = {})
71
71
  request(
72
72
  method: :post,
@@ -0,0 +1,42 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Capital
6
+ class FinancingOfferService < StripeService
7
+ # Retrieves the financing offers available for Connected accounts that belong to your platform.
8
+ def list(params = {}, opts = {})
9
+ request(
10
+ method: :get,
11
+ path: "/v1/capital/financing_offers",
12
+ params: params,
13
+ opts: opts,
14
+ base_address: :api
15
+ )
16
+ end
17
+
18
+ # Acknowledges that platform has received and delivered the financing_offer to
19
+ # the intended merchant recipient.
20
+ def mark_delivered(financing_offer, params = {}, opts = {})
21
+ request(
22
+ method: :post,
23
+ path: format("/v1/capital/financing_offers/%<financing_offer>s/mark_delivered", { financing_offer: CGI.escape(financing_offer) }),
24
+ params: params,
25
+ opts: opts,
26
+ base_address: :api
27
+ )
28
+ end
29
+
30
+ # Get the details of the financing offer
31
+ def retrieve(financing_offer, params = {}, opts = {})
32
+ request(
33
+ method: :get,
34
+ path: format("/v1/capital/financing_offers/%<financing_offer>s", { financing_offer: CGI.escape(financing_offer) }),
35
+ params: params,
36
+ opts: opts,
37
+ base_address: :api
38
+ )
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,19 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Capital
6
+ class FinancingSummaryService < StripeService
7
+ # Retrieve the financing state for the account that was authenticated in the request.
8
+ def retrieve(params = {}, opts = {})
9
+ request(
10
+ method: :get,
11
+ path: "/v1/capital/financing_summary",
12
+ params: params,
13
+ opts: opts,
14
+ base_address: :api
15
+ )
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,31 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Capital
6
+ class FinancingTransactionService < StripeService
7
+ # Returns a list of financing transactions. The transactions are returned in sorted order,
8
+ # with the most recent transactions appearing first.
9
+ def list(params = {}, opts = {})
10
+ request(
11
+ method: :get,
12
+ path: "/v1/capital/financing_transactions",
13
+ params: params,
14
+ opts: opts,
15
+ base_address: :api
16
+ )
17
+ end
18
+
19
+ # Retrieves a financing transaction for a financing offer.
20
+ def retrieve(financing_transaction, params = {}, opts = {})
21
+ request(
22
+ method: :get,
23
+ path: format("/v1/capital/financing_transactions/%<financing_transaction>s", { financing_transaction: CGI.escape(financing_transaction) }),
24
+ params: params,
25
+ opts: opts,
26
+ base_address: :api
27
+ )
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,15 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ class CapitalService < StripeService
6
+ attr_reader :financing_offers, :financing_summary, :financing_transactions
7
+
8
+ def initialize(requestor)
9
+ super(requestor)
10
+ @financing_offers = Stripe::Capital::FinancingOfferService.new(@requestor)
11
+ @financing_summary = Stripe::Capital::FinancingSummaryService.new(@requestor)
12
+ @financing_transactions = Stripe::Capital::FinancingTransactionService.new(@requestor)
13
+ end
14
+ end
15
+ end