stripe 13.1.1 → 13.2.0.pre.beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +1385 -645
  3. data/OPENAPI_VERSION +1 -1
  4. data/VERSION +1 -1
  5. data/lib/stripe/object_types.rb +22 -0
  6. data/lib/stripe/request_signing_authenticator.rb +79 -0
  7. data/lib/stripe/resources/account_notice.rb +32 -0
  8. data/lib/stripe/resources/billing/credit_grant.rb +5 -6
  9. data/lib/stripe/resources/capital/financing_offer.rb +49 -0
  10. data/lib/stripe/resources/capital/financing_summary.rb +15 -0
  11. data/lib/stripe/resources/capital/financing_transaction.rb +27 -0
  12. data/lib/stripe/resources/financial_connections/account.rb +3 -0
  13. data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +14 -0
  14. data/lib/stripe/resources/financial_connections/institution.rb +26 -0
  15. data/lib/stripe/resources/gift_cards/card.rb +59 -0
  16. data/lib/stripe/resources/gift_cards/transaction.rb +93 -0
  17. data/lib/stripe/resources/invoice.rb +81 -0
  18. data/lib/stripe/resources/invoice_payment.rb +12 -0
  19. data/lib/stripe/resources/issuing/card.rb +1 -1
  20. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +88 -0
  21. data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +26 -0
  22. data/lib/stripe/resources/issuing/fraud_liability_debit.rb +26 -0
  23. data/lib/stripe/resources/margin.rb +37 -0
  24. data/lib/stripe/resources/order.rb +120 -0
  25. data/lib/stripe/resources/payment_attempt_record.rb +27 -0
  26. data/lib/stripe/resources/payment_intent.rb +70 -0
  27. data/lib/stripe/resources/payment_record.rb +115 -0
  28. data/lib/stripe/resources/quote.rb +104 -0
  29. data/lib/stripe/resources/quote_preview_invoice.rb +43 -0
  30. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +11 -0
  31. data/lib/stripe/resources/subscription_schedule.rb +20 -0
  32. data/lib/stripe/resources/tax/association.rb +24 -0
  33. data/lib/stripe/resources/tax/form.rb +49 -0
  34. data/lib/stripe/resources/terminal/reader.rb +60 -0
  35. data/lib/stripe/resources/terminal/reader_collected_data.rb +14 -0
  36. data/lib/stripe/resources.rb +21 -0
  37. data/lib/stripe/services/account_notice_service.rb +39 -0
  38. data/lib/stripe/services/billing/credit_grant_service.rb +3 -3
  39. data/lib/stripe/services/capital/financing_offer_service.rb +42 -0
  40. data/lib/stripe/services/capital/financing_summary_service.rb +19 -0
  41. data/lib/stripe/services/capital/financing_transaction_service.rb +31 -0
  42. data/lib/stripe/services/capital_service.rb +15 -0
  43. data/lib/stripe/services/financial_connections/account_inferred_balance_service.rb +19 -0
  44. data/lib/stripe/services/financial_connections/account_service.rb +3 -1
  45. data/lib/stripe/services/financial_connections/institution_service.rb +30 -0
  46. data/lib/stripe/services/financial_connections_service.rb +2 -1
  47. data/lib/stripe/services/gift_cards/card_service.rb +63 -0
  48. data/lib/stripe/services/gift_cards/transaction_service.rb +74 -0
  49. data/lib/stripe/services/gift_cards_service.rb +14 -0
  50. data/lib/stripe/services/invoice_payment_service.rb +28 -0
  51. data/lib/stripe/services/invoice_service.rb +44 -1
  52. data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +74 -0
  53. data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +30 -0
  54. data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +30 -0
  55. data/lib/stripe/services/issuing_service.rb +5 -1
  56. data/lib/stripe/services/margin_service.rb +50 -0
  57. data/lib/stripe/services/order_line_item_service.rb +17 -0
  58. data/lib/stripe/services/order_service.rb +78 -0
  59. data/lib/stripe/services/payment_attempt_record_service.rb +28 -0
  60. data/lib/stripe/services/payment_intent_service.rb +37 -0
  61. data/lib/stripe/services/payment_record_service.rb +78 -0
  62. data/lib/stripe/services/quote_line_service.rb +17 -0
  63. data/lib/stripe/services/quote_preview_invoice_service.rb +17 -0
  64. data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +17 -0
  65. data/lib/stripe/services/quote_service.rb +49 -1
  66. data/lib/stripe/services/subscription_schedule_service.rb +11 -0
  67. data/lib/stripe/services/tax/association_service.rb +19 -0
  68. data/lib/stripe/services/tax/form_service.rb +37 -0
  69. data/lib/stripe/services/tax_service.rb +3 -1
  70. data/lib/stripe/services/terminal/reader_collected_data_service.rb +19 -0
  71. data/lib/stripe/services/terminal/reader_service.rb +33 -0
  72. data/lib/stripe/services/terminal_service.rb +2 -1
  73. data/lib/stripe/services/v1_services.rb +8 -1
  74. data/lib/stripe/services.rb +25 -0
  75. data/lib/stripe/stripe_configuration.rb +3 -1
  76. data/lib/stripe/util.rb +7 -1
  77. data/lib/stripe/version.rb +1 -1
  78. data/lib/stripe.rb +45 -0
  79. metadata +51 -4
@@ -0,0 +1,43 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ # Invoices are statements of amounts owed by a customer, and are either
6
+ # generated one-off, or generated periodically from a subscription.
7
+ #
8
+ # They contain [invoice items](https://stripe.com/docs/api#invoiceitems), and proration adjustments
9
+ # that may be caused by subscription upgrades/downgrades (if necessary).
10
+ #
11
+ # If your invoice is configured to be billed through automatic charges,
12
+ # Stripe automatically finalizes your invoice and attempts payment. Note
13
+ # that finalizing the invoice,
14
+ # [when automatic](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection), does
15
+ # not happen immediately as the invoice is created. Stripe waits
16
+ # until one hour after the last webhook was successfully sent (or the last
17
+ # webhook timed out after failing). If you (and the platforms you may have
18
+ # connected to) have no webhooks configured, Stripe waits one hour after
19
+ # creation to finalize the invoice.
20
+ #
21
+ # If your invoice is configured to be billed by sending an email, then based on your
22
+ # [email settings](https://dashboard.stripe.com/account/billing/automatic),
23
+ # Stripe will email the invoice to your customer and await payment. These
24
+ # emails can contain a link to a hosted page to pay the invoice.
25
+ #
26
+ # Stripe applies any customer credit on the account before determining the
27
+ # amount due for the invoice (i.e., the amount that will be actually
28
+ # charged). If the amount due for the invoice is less than Stripe's [minimum allowed charge
29
+ # per currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts), the
30
+ # invoice is automatically marked paid, and we add the amount due to the
31
+ # customer's credit balance which is applied to the next invoice.
32
+ #
33
+ # More details on the customer's credit balance are
34
+ # [here](https://stripe.com/docs/billing/customer/balance).
35
+ #
36
+ # Related guide: [Send invoices to customers](https://stripe.com/docs/billing/invoices/sending)
37
+ class QuotePreviewInvoice < APIResource
38
+ OBJECT_NAME = "quote_preview_invoice"
39
+ def self.object_name
40
+ "quote_preview_invoice"
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,11 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ class QuotePreviewSubscriptionSchedule < APIResource
6
+ OBJECT_NAME = "quote_preview_subscription_schedule"
7
+ def self.object_name
8
+ "quote_preview_subscription_schedule"
9
+ end
10
+ end
11
+ end
@@ -15,6 +15,26 @@ module Stripe
15
15
  "subscription_schedule"
16
16
  end
17
17
 
18
+ # Amends an existing subscription schedule.
19
+ def amend(params = {}, opts = {})
20
+ request_stripe_object(
21
+ method: :post,
22
+ path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(self["id"]) }),
23
+ params: params,
24
+ opts: opts
25
+ )
26
+ end
27
+
28
+ # Amends an existing subscription schedule.
29
+ def self.amend(schedule, params = {}, opts = {})
30
+ request_stripe_object(
31
+ method: :post,
32
+ path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(schedule) }),
33
+ params: params,
34
+ opts: opts
35
+ )
36
+ end
37
+
18
38
  # Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.
19
39
  def cancel(params = {}, opts = {})
20
40
  request_stripe_object(
@@ -0,0 +1,24 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Tax
6
+ # A Tax Association exposes the Tax Transactions that Stripe attempted to create on your behalf based on the PaymentIntent input
7
+ class Association < APIResource
8
+ OBJECT_NAME = "tax.association"
9
+ def self.object_name
10
+ "tax.association"
11
+ end
12
+
13
+ # Finds a tax association object by PaymentIntent id.
14
+ def self.find(params = {}, opts = {})
15
+ request_stripe_object(
16
+ method: :get,
17
+ path: "/v1/tax/associations/find",
18
+ params: params,
19
+ opts: opts
20
+ )
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,49 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Tax
6
+ # Tax forms are legal documents which are delivered to one or more tax authorities for information reporting purposes.
7
+ #
8
+ # Related guide: [US tax reporting for Connect platforms](https://stripe.com/docs/connect/tax-reporting)
9
+ class Form < APIResource
10
+ extend Stripe::APIOperations::List
11
+
12
+ OBJECT_NAME = "tax.form"
13
+ def self.object_name
14
+ "tax.form"
15
+ end
16
+
17
+ # Returns a list of tax forms which were previously created. The tax forms are returned in sorted order, with the oldest tax forms appearing first.
18
+ def self.list(filters = {}, opts = {})
19
+ request_stripe_object(method: :get, path: "/v1/tax/forms", params: filters, opts: opts)
20
+ end
21
+
22
+ # Download the PDF for a tax form.
23
+ def pdf(params = {}, opts = {}, &read_body_chunk_block)
24
+ opts = { api_base: APIRequestor.active_requestor.config.uploads_base }.merge(opts)
25
+ request_stream(
26
+ method: :get,
27
+ path: format("/v1/tax/forms/%<id>s/pdf", { id: CGI.escape(self["id"]) }),
28
+ params: params,
29
+ opts: opts,
30
+ base_address: :files,
31
+ &read_body_chunk_block
32
+ )
33
+ end
34
+
35
+ # Download the PDF for a tax form.
36
+ def self.pdf(id, params = {}, opts = {}, &read_body_chunk_block)
37
+ opts = { api_base: APIRequestor.active_requestor.config.uploads_base }.merge(opts)
38
+ execute_resource_request_stream(
39
+ :get,
40
+ format("/v1/tax/forms/%<id>s/pdf", { id: CGI.escape(id) }),
41
+ :files,
42
+ params,
43
+ opts,
44
+ &read_body_chunk_block
45
+ )
46
+ end
47
+ end
48
+ end
49
+ end
@@ -37,6 +37,66 @@ module Stripe
37
37
  )
38
38
  end
39
39
 
40
+ # Initiates an input collection flow on a Reader.
41
+ def collect_inputs(params = {}, opts = {})
42
+ request_stripe_object(
43
+ method: :post,
44
+ path: format("/v1/terminal/readers/%<reader>s/collect_inputs", { reader: CGI.escape(self["id"]) }),
45
+ params: params,
46
+ opts: opts
47
+ )
48
+ end
49
+
50
+ # Initiates an input collection flow on a Reader.
51
+ def self.collect_inputs(reader, params = {}, opts = {})
52
+ request_stripe_object(
53
+ method: :post,
54
+ path: format("/v1/terminal/readers/%<reader>s/collect_inputs", { reader: CGI.escape(reader) }),
55
+ params: params,
56
+ opts: opts
57
+ )
58
+ end
59
+
60
+ # Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation.
61
+ def collect_payment_method(params = {}, opts = {})
62
+ request_stripe_object(
63
+ method: :post,
64
+ path: format("/v1/terminal/readers/%<reader>s/collect_payment_method", { reader: CGI.escape(self["id"]) }),
65
+ params: params,
66
+ opts: opts
67
+ )
68
+ end
69
+
70
+ # Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation.
71
+ def self.collect_payment_method(reader, params = {}, opts = {})
72
+ request_stripe_object(
73
+ method: :post,
74
+ path: format("/v1/terminal/readers/%<reader>s/collect_payment_method", { reader: CGI.escape(reader) }),
75
+ params: params,
76
+ opts: opts
77
+ )
78
+ end
79
+
80
+ # Finalizes a payment on a Reader.
81
+ def confirm_payment_intent(params = {}, opts = {})
82
+ request_stripe_object(
83
+ method: :post,
84
+ path: format("/v1/terminal/readers/%<reader>s/confirm_payment_intent", { reader: CGI.escape(self["id"]) }),
85
+ params: params,
86
+ opts: opts
87
+ )
88
+ end
89
+
90
+ # Finalizes a payment on a Reader.
91
+ def self.confirm_payment_intent(reader, params = {}, opts = {})
92
+ request_stripe_object(
93
+ method: :post,
94
+ path: format("/v1/terminal/readers/%<reader>s/confirm_payment_intent", { reader: CGI.escape(reader) }),
95
+ params: params,
96
+ opts: opts
97
+ )
98
+ end
99
+
40
100
  # Creates a new Reader object.
41
101
  def self.create(params = {}, opts = {})
42
102
  request_stripe_object(
@@ -0,0 +1,14 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Terminal
6
+ # Returns data collected by Terminal readers. This data is only stored for 24 hours.
7
+ class ReaderCollectedData < APIResource
8
+ OBJECT_NAME = "terminal.reader_collected_data"
9
+ def self.object_name
10
+ "terminal.reader_collected_data"
11
+ end
12
+ end
13
+ end
14
+ end
@@ -3,6 +3,7 @@
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"
8
9
  require "stripe/resources/application_fee"
@@ -22,6 +23,9 @@ require "stripe/resources/billing/meter_event_summary"
22
23
  require "stripe/resources/billing_portal/configuration"
23
24
  require "stripe/resources/billing_portal/session"
24
25
  require "stripe/resources/capability"
26
+ require "stripe/resources/capital/financing_offer"
27
+ require "stripe/resources/capital/financing_summary"
28
+ require "stripe/resources/capital/financing_transaction"
25
29
  require "stripe/resources/card"
26
30
  require "stripe/resources/cash_balance"
27
31
  require "stripe/resources/charge"
@@ -48,22 +52,30 @@ require "stripe/resources/exchange_rate"
48
52
  require "stripe/resources/file"
49
53
  require "stripe/resources/file_link"
50
54
  require "stripe/resources/financial_connections/account"
55
+ require "stripe/resources/financial_connections/account_inferred_balance"
51
56
  require "stripe/resources/financial_connections/account_owner"
52
57
  require "stripe/resources/financial_connections/account_ownership"
58
+ require "stripe/resources/financial_connections/institution"
53
59
  require "stripe/resources/financial_connections/session"
54
60
  require "stripe/resources/financial_connections/transaction"
55
61
  require "stripe/resources/forwarding/request"
56
62
  require "stripe/resources/funding_instructions"
63
+ require "stripe/resources/gift_cards/card"
64
+ require "stripe/resources/gift_cards/transaction"
57
65
  require "stripe/resources/identity/verification_report"
58
66
  require "stripe/resources/identity/verification_session"
59
67
  require "stripe/resources/invoice"
60
68
  require "stripe/resources/invoice_item"
61
69
  require "stripe/resources/invoice_line_item"
70
+ require "stripe/resources/invoice_payment"
62
71
  require "stripe/resources/invoice_rendering_template"
63
72
  require "stripe/resources/issuing/authorization"
64
73
  require "stripe/resources/issuing/card"
65
74
  require "stripe/resources/issuing/cardholder"
75
+ require "stripe/resources/issuing/credit_underwriting_record"
66
76
  require "stripe/resources/issuing/dispute"
77
+ require "stripe/resources/issuing/dispute_settlement_detail"
78
+ require "stripe/resources/issuing/fraud_liability_debit"
67
79
  require "stripe/resources/issuing/personalization_design"
68
80
  require "stripe/resources/issuing/physical_bundle"
69
81
  require "stripe/resources/issuing/token"
@@ -71,11 +83,15 @@ require "stripe/resources/issuing/transaction"
71
83
  require "stripe/resources/line_item"
72
84
  require "stripe/resources/login_link"
73
85
  require "stripe/resources/mandate"
86
+ require "stripe/resources/margin"
87
+ require "stripe/resources/order"
88
+ require "stripe/resources/payment_attempt_record"
74
89
  require "stripe/resources/payment_intent"
75
90
  require "stripe/resources/payment_link"
76
91
  require "stripe/resources/payment_method"
77
92
  require "stripe/resources/payment_method_configuration"
78
93
  require "stripe/resources/payment_method_domain"
94
+ require "stripe/resources/payment_record"
79
95
  require "stripe/resources/payout"
80
96
  require "stripe/resources/person"
81
97
  require "stripe/resources/plan"
@@ -84,6 +100,8 @@ require "stripe/resources/product"
84
100
  require "stripe/resources/product_feature"
85
101
  require "stripe/resources/promotion_code"
86
102
  require "stripe/resources/quote"
103
+ require "stripe/resources/quote_preview_invoice"
104
+ require "stripe/resources/quote_preview_subscription_schedule"
87
105
  require "stripe/resources/radar/early_fraud_warning"
88
106
  require "stripe/resources/radar/value_list"
89
107
  require "stripe/resources/radar/value_list_item"
@@ -101,8 +119,10 @@ require "stripe/resources/source_transaction"
101
119
  require "stripe/resources/subscription"
102
120
  require "stripe/resources/subscription_item"
103
121
  require "stripe/resources/subscription_schedule"
122
+ require "stripe/resources/tax/association"
104
123
  require "stripe/resources/tax/calculation"
105
124
  require "stripe/resources/tax/calculation_line_item"
125
+ require "stripe/resources/tax/form"
106
126
  require "stripe/resources/tax/registration"
107
127
  require "stripe/resources/tax/settings"
108
128
  require "stripe/resources/tax/transaction"
@@ -114,6 +134,7 @@ require "stripe/resources/terminal/configuration"
114
134
  require "stripe/resources/terminal/connection_token"
115
135
  require "stripe/resources/terminal/location"
116
136
  require "stripe/resources/terminal/reader"
137
+ require "stripe/resources/terminal/reader_collected_data"
117
138
  require "stripe/resources/test_helpers/test_clock"
118
139
  require "stripe/resources/token"
119
140
  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
@@ -15,7 +15,7 @@ module Stripe
15
15
  )
16
16
  end
17
17
 
18
- # Expires a credit grant
18
+ # Expires a credit grant.
19
19
  def expire(id, params = {}, opts = {})
20
20
  request(
21
21
  method: :post,
@@ -26,7 +26,7 @@ module Stripe
26
26
  )
27
27
  end
28
28
 
29
- # Retrieve a list of credit grants
29
+ # Retrieve a list of credit grants.
30
30
  def list(params = {}, opts = {})
31
31
  request(
32
32
  method: :get,
@@ -59,7 +59,7 @@ module Stripe
59
59
  )
60
60
  end
61
61
 
62
- # Voids a credit grant
62
+ # Voids a credit grant.
63
63
  def void_grant(id, params = {}, opts = {})
64
64
  request(
65
65
  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
@@ -0,0 +1,19 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module FinancialConnections
6
+ class AccountInferredBalanceService < StripeService
7
+ # Lists the recorded inferred balances for a Financial Connections Account.
8
+ def list(account, params = {}, opts = {})
9
+ request(
10
+ method: :get,
11
+ path: format("/v1/financial_connections/accounts/%<account>s/inferred_balances", { account: CGI.escape(account) }),
12
+ params: params,
13
+ opts: opts,
14
+ base_address: :api
15
+ )
16
+ end
17
+ end
18
+ end
19
+ end
@@ -4,10 +4,12 @@
4
4
  module Stripe
5
5
  module FinancialConnections
6
6
  class AccountService < StripeService
7
- attr_reader :owners
7
+ attr_reader :inferred_balances, :owners
8
8
 
9
9
  def initialize(requestor)
10
10
  super(requestor)
11
+ @inferred_balances = Stripe::FinancialConnections::AccountInferredBalanceService
12
+ .new(@requestor)
11
13
  @owners = Stripe::FinancialConnections::AccountOwnerService.new(@requestor)
12
14
  end
13
15
 
@@ -0,0 +1,30 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module FinancialConnections
6
+ class InstitutionService < StripeService
7
+ # Returns a list of Financial Connections Institution objects.
8
+ def list(params = {}, opts = {})
9
+ request(
10
+ method: :get,
11
+ path: "/v1/financial_connections/institutions",
12
+ params: params,
13
+ opts: opts,
14
+ base_address: :api
15
+ )
16
+ end
17
+
18
+ # Retrieves the details of a Financial Connections Institution.
19
+ def retrieve(institution, params = {}, opts = {})
20
+ request(
21
+ method: :get,
22
+ path: format("/v1/financial_connections/institutions/%<institution>s", { institution: CGI.escape(institution) }),
23
+ params: params,
24
+ opts: opts,
25
+ base_address: :api
26
+ )
27
+ end
28
+ end
29
+ end
30
+ end
@@ -3,11 +3,12 @@
3
3
 
4
4
  module Stripe
5
5
  class FinancialConnectionsService < StripeService
6
- attr_reader :accounts, :sessions, :transactions
6
+ attr_reader :accounts, :institutions, :sessions, :transactions
7
7
 
8
8
  def initialize(requestor)
9
9
  super(requestor)
10
10
  @accounts = Stripe::FinancialConnections::AccountService.new(@requestor)
11
+ @institutions = Stripe::FinancialConnections::InstitutionService.new(@requestor)
11
12
  @sessions = Stripe::FinancialConnections::SessionService.new(@requestor)
12
13
  @transactions = Stripe::FinancialConnections::TransactionService.new(@requestor)
13
14
  end
@@ -0,0 +1,63 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module GiftCards
6
+ class CardService < StripeService
7
+ # Creates a new gift card object.
8
+ def create(params = {}, opts = {})
9
+ request(
10
+ method: :post,
11
+ path: "/v1/gift_cards/cards",
12
+ params: params,
13
+ opts: opts,
14
+ base_address: :api
15
+ )
16
+ end
17
+
18
+ # List gift cards for an account
19
+ def list(params = {}, opts = {})
20
+ request(
21
+ method: :get,
22
+ path: "/v1/gift_cards/cards",
23
+ params: params,
24
+ opts: opts,
25
+ base_address: :api
26
+ )
27
+ end
28
+
29
+ # Retrieve a gift card by id
30
+ def retrieve(id, params = {}, opts = {})
31
+ request(
32
+ method: :get,
33
+ path: format("/v1/gift_cards/cards/%<id>s", { id: CGI.escape(id) }),
34
+ params: params,
35
+ opts: opts,
36
+ base_address: :api
37
+ )
38
+ end
39
+
40
+ # Update a gift card
41
+ def update(id, params = {}, opts = {})
42
+ request(
43
+ method: :post,
44
+ path: format("/v1/gift_cards/cards/%<id>s", { id: CGI.escape(id) }),
45
+ params: params,
46
+ opts: opts,
47
+ base_address: :api
48
+ )
49
+ end
50
+
51
+ # Validates a gift card code, returning the matching gift card object if it exists.
52
+ def validate(params = {}, opts = {})
53
+ request(
54
+ method: :post,
55
+ path: "/v1/gift_cards/cards/validate",
56
+ params: params,
57
+ opts: opts,
58
+ base_address: :api
59
+ )
60
+ end
61
+ end
62
+ end
63
+ end