stripe 18.5.0.pre.alpha.3 → 18.5.0.pre.alpha.4

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 (58) hide show
  1. checksums.yaml +4 -4
  2. data/lib/stripe/api_requestor.rb +5 -43
  3. data/lib/stripe/object_types.rb +2 -0
  4. data/lib/stripe/params/account_session_create_params.rb +9 -2
  5. data/lib/stripe/params/checkout/session_approve_params.rb +52 -0
  6. data/lib/stripe/params/checkout/session_create_params.rb +8 -0
  7. data/lib/stripe/params/delegated_checkout/requested_session_update_params.rb +41 -2
  8. data/lib/stripe/params/orchestration/payment_attempt_retrieve_params.rb +15 -0
  9. data/lib/stripe/params/payment_attempt_record_report_authenticated_params.rb +19 -0
  10. data/lib/stripe/params/payment_attempt_record_report_canceled_params.rb +19 -0
  11. data/lib/stripe/params/payment_attempt_record_report_failed_params.rb +22 -0
  12. data/lib/stripe/params/payment_attempt_record_report_guaranteed_params.rb +19 -0
  13. data/lib/stripe/params/payment_attempt_record_report_informational_params.rb +93 -0
  14. data/lib/stripe/params/payment_attempt_record_report_refund_params.rb +79 -0
  15. data/lib/stripe/params/payment_intent_confirm_params.rb +15 -1
  16. data/lib/stripe/params/payment_intent_create_params.rb +15 -1
  17. data/lib/stripe/params/payment_intent_simulate_crypto_deposit_params.rb +31 -0
  18. data/lib/stripe/params/payment_intent_update_params.rb +15 -1
  19. data/lib/stripe/params/payment_record_report_payment_attempt_failed_params.rb +4 -1
  20. data/lib/stripe/params/payment_record_report_payment_attempt_params.rb +4 -1
  21. data/lib/stripe/params/payment_record_report_payment_params.rb +4 -1
  22. data/lib/stripe/params/radar/customer_evaluation_create_params.rb +69 -0
  23. data/lib/stripe/params/radar/customer_evaluation_update_params.rb +59 -0
  24. data/lib/stripe/params/radar/issuing_authorization_evaluation_create_params.rb +32 -32
  25. data/lib/stripe/params/shared_payment/granted_token_create_params.rb +4 -1
  26. data/lib/stripe/params/tax/registration_create_params.rb +14 -1
  27. data/lib/stripe/params/test_helpers/payment_intent_simulate_crypto_deposit_params.rb +33 -0
  28. data/lib/stripe/params/test_helpers/shared_payment/granted_token_create_params.rb +4 -1
  29. data/lib/stripe/params.rb +12 -0
  30. data/lib/stripe/request_params.rb +5 -8
  31. data/lib/stripe/resources/account_signals.rb +1 -1
  32. data/lib/stripe/resources/checkout/session.rb +188 -0
  33. data/lib/stripe/resources/invoice_item.rb +6 -14
  34. data/lib/stripe/resources/invoice_line_item.rb +6 -14
  35. data/lib/stripe/resources/issuing/authorization.rb +120 -0
  36. data/lib/stripe/resources/orchestration/payment_attempt.rb +31 -0
  37. data/lib/stripe/resources/payment_attempt_record.rb +120 -0
  38. data/lib/stripe/resources/payment_intent.rb +166 -1
  39. data/lib/stripe/resources/radar/customer_evaluation.rb +153 -0
  40. data/lib/stripe/resources/radar/issuing_authorization_evaluation.rb +31 -31
  41. data/lib/stripe/resources/tax/registration.rb +16 -0
  42. data/lib/stripe/resources/v2/money_management/received_debit.rb +1 -1
  43. data/lib/stripe/resources.rb +2 -0
  44. data/lib/stripe/services/checkout/session_service.rb +11 -0
  45. data/lib/stripe/services/orchestration/payment_attempt_service.rb +19 -0
  46. data/lib/stripe/services/orchestration_service.rb +13 -0
  47. data/lib/stripe/services/payment_attempt_record_service.rb +66 -0
  48. data/lib/stripe/services/radar/customer_evaluation_service.rb +30 -0
  49. data/lib/stripe/services/radar_service.rb +2 -1
  50. data/lib/stripe/services/test_helpers/payment_intent_service.rb +19 -0
  51. data/lib/stripe/services/test_helpers_service.rb +2 -1
  52. data/lib/stripe/services/v1_services.rb +2 -1
  53. data/lib/stripe/services.rb +4 -0
  54. data/lib/stripe/version.rb +1 -1
  55. data/rbi/stripe.rbi +1841 -146
  56. metadata +20 -4
  57. data/lib/stripe/resources/alipay_account.rb +0 -34
  58. data/lib/stripe/resources/recipient_transfer.rb +0 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 85f5f2c6fac61004140fd3d15063f354d8df01ad937ac776555a22e67728a7df
4
- data.tar.gz: c620ae2a43eac1f165b4b343fcf859e9fb5ecd92a714d69c9d40f4ff79d16f98
3
+ metadata.gz: 74579c8b43ee61e3a3f44eac160fd911fbb05be52bae41d01b6a264fff38e348
4
+ data.tar.gz: dc8208a7dc5edd9550f382a96a29e8d6a600c76b9e0d94c2b6d1b101bdc2e383
5
5
  SHA512:
6
- metadata.gz: fb5daaf23613df62254606d5a21bfba6e9112cf2795378d0291ea884f37dc6dffb8a8d3f61d079d35c303336e5a885a020e9b3bd73a6ddf856b30476ccdea76d
7
- data.tar.gz: 42aa4f19293b9e36b4bcd69dbc010c66a88d4e410c1aa7ce4d0b7bbf4ad375903dcfdf3f1d8c2a83867bb568a20562d3b079230f4052208891ef7f5496a71bb4
6
+ metadata.gz: 6f4546d6e56098b72019a2839faf49756af82f956165579efc238905f711acfb682ea299f398bdd43e5404f09c5fff765eb608d3f145e45ab42c3ede9a68bf5e
7
+ data.tar.gz: 8d2aebdd16da9a183f24e9a90320eafdc2d32e246c0eae300b71f2a111eed00e739cb998622628fc00734ca47d8d4f8997d3bac832f2600638640e304153959d
@@ -15,7 +15,6 @@ module Stripe
15
15
 
16
16
  # Initializes a new APIRequestor
17
17
  def initialize(config_arg = {})
18
- @system_profiler = SystemProfiler.new
19
18
  @last_request_metrics = Queue.new
20
19
 
21
20
  @config = case config_arg
@@ -996,7 +995,7 @@ module Stripe
996
995
  headers["Stripe-Account"] = req_opts[:stripe_account] if req_opts[:stripe_account]
997
996
  headers["Stripe-Context"] = req_opts[:stripe_context] if req_opts[:stripe_context]
998
997
 
999
- user_agent = @system_profiler.user_agent
998
+ user_agent = SystemProfiler.user_agent
1000
999
  begin
1001
1000
  headers.update(
1002
1001
  "X-Stripe-Client-User-Agent" => JSON.generate(user_agent)
@@ -1098,37 +1097,6 @@ module Stripe
1098
1097
  # in so that we can generate a rich user agent header to help debug
1099
1098
  # integrations.
1100
1099
  class SystemProfiler
1101
- def self.uname
1102
- if ::File.exist?("/proc/version")
1103
- ::File.read("/proc/version").strip
1104
- else
1105
- case RbConfig::CONFIG["host_os"]
1106
- when /linux|darwin|bsd|sunos|solaris|cygwin/i
1107
- uname_from_system
1108
- when /mswin|mingw/i
1109
- uname_from_system_ver
1110
- else
1111
- "unknown platform"
1112
- end
1113
- end
1114
- end
1115
-
1116
- def self.uname_from_system
1117
- (`uname -a 2>/dev/null` || "").strip
1118
- rescue Errno::ENOENT
1119
- "uname executable not found"
1120
- rescue Errno::ENOMEM # couldn't create subprocess
1121
- "uname lookup failed"
1122
- end
1123
-
1124
- def self.uname_from_system_ver
1125
- (`ver` || "").strip
1126
- rescue Errno::ENOENT
1127
- "ver executable not found"
1128
- rescue Errno::ENOMEM # couldn't create subprocess
1129
- "uname lookup failed"
1130
- end
1131
-
1132
1100
  AI_AGENTS = [
1133
1101
  # aiAgents: The beginning of the section generated from our OpenAPI spec
1134
1102
  %w[ANTIGRAVITY_CLI_ALIAS antigravity],
@@ -1151,11 +1119,7 @@ module Stripe
1151
1119
  ""
1152
1120
  end
1153
1121
 
1154
- def initialize
1155
- @uname = self.class.uname
1156
- end
1157
-
1158
- def user_agent
1122
+ def self.user_agent
1159
1123
  lang_version = "#{RUBY_VERSION} p#{RUBY_PATCHLEVEL} " \
1160
1124
  "(#{RUBY_RELEASE_DATE})"
1161
1125
 
@@ -1164,14 +1128,12 @@ module Stripe
1164
1128
  bindings_version: Stripe::VERSION,
1165
1129
  lang: "ruby",
1166
1130
  lang_version: lang_version,
1167
- platform: RUBY_PLATFORM,
1168
1131
  engine: defined?(RUBY_ENGINE) ? RUBY_ENGINE : "",
1169
- publisher: "stripe",
1170
- uname: @uname,
1171
- hostname: Socket.gethostname,
1172
1132
  }.delete_if { |_k, v| v.nil? }
1173
1133
 
1174
- ai_agent = self.class.detect_ai_agent
1134
+ ua[:platform] = RUBY_PLATFORM if Stripe.enable_telemetry?
1135
+
1136
+ ai_agent = detect_ai_agent
1175
1137
  ua[:ai_agent] = ai_agent unless ai_agent.empty?
1176
1138
 
1177
1139
  ua
@@ -111,6 +111,7 @@ module Stripe
111
111
  LoginLink.object_name => LoginLink,
112
112
  Mandate.object_name => Mandate,
113
113
  Margin.object_name => Margin,
114
+ Orchestration::PaymentAttempt.object_name => Orchestration::PaymentAttempt,
114
115
  Order.object_name => Order,
115
116
  PaymentAttemptRecord.object_name => PaymentAttemptRecord,
116
117
  PaymentIntent.object_name => PaymentIntent,
@@ -137,6 +138,7 @@ module Stripe
137
138
  QuotePreviewInvoice.object_name => QuotePreviewInvoice,
138
139
  QuotePreviewSubscriptionSchedule.object_name => QuotePreviewSubscriptionSchedule,
139
140
  Radar::AccountEvaluation.object_name => Radar::AccountEvaluation,
141
+ Radar::CustomerEvaluation.object_name => Radar::CustomerEvaluation,
140
142
  Radar::EarlyFraudWarning.object_name => Radar::EarlyFraudWarning,
141
143
  Radar::IssuingAuthorizationEvaluation.object_name => Radar::IssuingAuthorizationEvaluation,
142
144
  Radar::PaymentEvaluation.object_name => Radar::PaymentEvaluation,
@@ -194,10 +194,17 @@ module Stripe
194
194
  end
195
195
 
196
196
  class CheckScanning < ::Stripe::RequestParams
197
- class Features < ::Stripe::RequestParams; end
197
+ class Features < ::Stripe::RequestParams
198
+ # Attribute for param field create_us_paper_check_on_application
199
+ attr_accessor :create_us_paper_check_on_application
200
+
201
+ def initialize(create_us_paper_check_on_application: nil)
202
+ @create_us_paper_check_on_application = create_us_paper_check_on_application
203
+ end
204
+ end
198
205
  # Whether the embedded component is enabled.
199
206
  attr_accessor :enabled
200
- # An empty list, because this embedded component has no features.
207
+ # The list of features enabled in the embedded component.
201
208
  attr_accessor :features
202
209
 
203
210
  def initialize(enabled: nil, features: nil)
@@ -0,0 +1,52 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Checkout
6
+ class SessionApproveParams < ::Stripe::RequestParams
7
+ class PaymentIntentData < ::Stripe::RequestParams
8
+ # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://docs.stripe.com/payments/connected-accounts).
9
+ attr_accessor :application_fee_amount
10
+
11
+ def initialize(application_fee_amount: nil)
12
+ @application_fee_amount = application_fee_amount
13
+ end
14
+ end
15
+
16
+ class SubscriptionData < ::Stripe::RequestParams
17
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. To use an application fee percent, the request must be made on behalf of another account, using the `Stripe-Account` header or an OAuth key. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
18
+ attr_accessor :application_fee_percent
19
+
20
+ def initialize(application_fee_percent: nil)
21
+ @application_fee_percent = application_fee_percent
22
+ end
23
+ end
24
+ # The ID of the customer's attempt to pay to approve.
25
+ attr_accessor :attempt
26
+ # Specifies which fields in the response should be expanded.
27
+ attr_accessor :expand
28
+ # A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.
29
+ attr_accessor :payment_intent_data
30
+ # The URL to redirect your customer back to after they authenticate or cancel their payment on the
31
+ # payment method's app or site. This parameter is allowed and required if and only if you did not
32
+ # set the return URL during Checkout Session creation or in `checkout.confirm()` in Stripe.js.
33
+ attr_accessor :return_url
34
+ # A subset of parameters to be passed to subscription creation for Checkout Sessions in `subscription` mode.
35
+ attr_accessor :subscription_data
36
+
37
+ def initialize(
38
+ attempt: nil,
39
+ expand: nil,
40
+ payment_intent_data: nil,
41
+ return_url: nil,
42
+ subscription_data: nil
43
+ )
44
+ @attempt = attempt
45
+ @expand = expand
46
+ @payment_intent_data = payment_intent_data
47
+ @return_url = return_url
48
+ @subscription_data = subscription_data
49
+ end
50
+ end
51
+ end
52
+ end
@@ -2653,6 +2653,12 @@ module Stripe
2653
2653
  attr_accessor :ui_mode
2654
2654
  # Wallet-specific configuration.
2655
2655
  attr_accessor :wallet_options
2656
+ # Determines whether the customer's attempt to pay must be manually approved.
2657
+ #
2658
+ # Default is `auto`, when the customer's attempt to pay is approved automatically with no action required on your server.
2659
+ #
2660
+ # When set to `manual`, you must approve the customer's attempt to pay by calling [approve](api/checkout/sessions/approve) from your server.
2661
+ attr_accessor :approval_method
2656
2662
  # Attribute for param field checkout_items
2657
2663
  attr_accessor :checkout_items
2658
2664
 
@@ -2707,6 +2713,7 @@ module Stripe
2707
2713
  tax_id_collection: nil,
2708
2714
  ui_mode: nil,
2709
2715
  wallet_options: nil,
2716
+ approval_method: nil,
2710
2717
  checkout_items: nil
2711
2718
  )
2712
2719
  @adaptive_pricing = adaptive_pricing
@@ -2759,6 +2766,7 @@ module Stripe
2759
2766
  @tax_id_collection = tax_id_collection
2760
2767
  @ui_mode = ui_mode
2761
2768
  @wallet_options = wallet_options
2769
+ @approval_method = approval_method
2762
2770
  @checkout_items = checkout_items
2763
2771
  end
2764
2772
  end
@@ -47,7 +47,7 @@ module Stripe
47
47
  end
48
48
 
49
49
  class Shipping < ::Stripe::RequestParams
50
- # The shipping option identifer.
50
+ # The shipping option identifier.
51
51
  attr_accessor :shipping_option
52
52
 
53
53
  def initialize(shipping_option: nil)
@@ -67,6 +67,41 @@ module Stripe
67
67
  @digital = digital
68
68
  end
69
69
  end
70
+
71
+ class SelectedFulfillmentOptionOverride < ::Stripe::RequestParams
72
+ class Digital < ::Stripe::RequestParams
73
+ # The digital option identifier.
74
+ attr_accessor :digital_option
75
+
76
+ def initialize(digital_option: nil)
77
+ @digital_option = digital_option
78
+ end
79
+ end
80
+
81
+ class Shipping < ::Stripe::RequestParams
82
+ # The shipping option identifier.
83
+ attr_accessor :shipping_option
84
+
85
+ def initialize(shipping_option: nil)
86
+ @shipping_option = shipping_option
87
+ end
88
+ end
89
+ # The digital fulfillment option.
90
+ attr_accessor :digital
91
+ # The line item keys that this fulfillment option override applies to.
92
+ attr_accessor :line_item_keys
93
+ # The shipping fulfillment option.
94
+ attr_accessor :shipping
95
+ # The type of fulfillment option.
96
+ attr_accessor :type
97
+
98
+ def initialize(digital: nil, line_item_keys: nil, shipping: nil, type: nil)
99
+ @digital = digital
100
+ @line_item_keys = line_item_keys
101
+ @shipping = shipping
102
+ @type = type
103
+ end
104
+ end
70
105
  # The customer's address.
71
106
  attr_accessor :address
72
107
  # The customer's email address.
@@ -77,19 +112,23 @@ module Stripe
77
112
  attr_accessor :phone
78
113
  # The fulfillment option to select.
79
114
  attr_accessor :selected_fulfillment_option
115
+ # The fulfillment option overrides for specific line items.
116
+ attr_accessor :selected_fulfillment_option_overrides
80
117
 
81
118
  def initialize(
82
119
  address: nil,
83
120
  email: nil,
84
121
  name: nil,
85
122
  phone: nil,
86
- selected_fulfillment_option: nil
123
+ selected_fulfillment_option: nil,
124
+ selected_fulfillment_option_overrides: nil
87
125
  )
88
126
  @address = address
89
127
  @email = email
90
128
  @name = name
91
129
  @phone = phone
92
130
  @selected_fulfillment_option = selected_fulfillment_option
131
+ @selected_fulfillment_option_overrides = selected_fulfillment_option_overrides
93
132
  end
94
133
  end
95
134
 
@@ -0,0 +1,15 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Orchestration
6
+ class PaymentAttemptRetrieveParams < ::Stripe::RequestParams
7
+ # Specifies which fields in the response should be expanded.
8
+ attr_accessor :expand
9
+
10
+ def initialize(expand: nil)
11
+ @expand = expand
12
+ end
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
+ class PaymentAttemptRecordReportAuthenticatedParams < ::Stripe::RequestParams
6
+ # When the reported payment was authenticated. Measured in seconds since the Unix epoch.
7
+ attr_accessor :authenticated_at
8
+ # Specifies which fields in the response should be expanded.
9
+ attr_accessor :expand
10
+ # Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
11
+ attr_accessor :metadata
12
+
13
+ def initialize(authenticated_at: nil, expand: nil, metadata: nil)
14
+ @authenticated_at = authenticated_at
15
+ @expand = expand
16
+ @metadata = metadata
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ class PaymentAttemptRecordReportCanceledParams < ::Stripe::RequestParams
6
+ # When the reported payment was canceled. Measured in seconds since the Unix epoch.
7
+ attr_accessor :canceled_at
8
+ # Specifies which fields in the response should be expanded.
9
+ attr_accessor :expand
10
+ # Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
11
+ attr_accessor :metadata
12
+
13
+ def initialize(canceled_at: nil, expand: nil, metadata: nil)
14
+ @canceled_at = canceled_at
15
+ @expand = expand
16
+ @metadata = metadata
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,22 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ class PaymentAttemptRecordReportFailedParams < ::Stripe::RequestParams
6
+ # Specifies which fields in the response should be expanded.
7
+ attr_accessor :expand
8
+ # When the reported payment failed. Measured in seconds since the Unix epoch.
9
+ attr_accessor :failed_at
10
+ # The failure code for this payment attempt. Must be one of `payment_method_customer_decline` or `payment_method_provider_unknown_outcome`.
11
+ attr_accessor :failure_code
12
+ # Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
13
+ attr_accessor :metadata
14
+
15
+ def initialize(expand: nil, failed_at: nil, failure_code: nil, metadata: nil)
16
+ @expand = expand
17
+ @failed_at = failed_at
18
+ @failure_code = failure_code
19
+ @metadata = metadata
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,19 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ class PaymentAttemptRecordReportGuaranteedParams < ::Stripe::RequestParams
6
+ # Specifies which fields in the response should be expanded.
7
+ attr_accessor :expand
8
+ # When the reported payment was guaranteed. Measured in seconds since the Unix epoch.
9
+ attr_accessor :guaranteed_at
10
+ # Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
11
+ attr_accessor :metadata
12
+
13
+ def initialize(expand: nil, guaranteed_at: nil, metadata: nil)
14
+ @expand = expand
15
+ @guaranteed_at = guaranteed_at
16
+ @metadata = metadata
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,93 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ class PaymentAttemptRecordReportInformationalParams < ::Stripe::RequestParams
6
+ class CustomerDetails < ::Stripe::RequestParams
7
+ # The customer who made the payment.
8
+ attr_accessor :customer
9
+ # The customer's phone number.
10
+ attr_accessor :email
11
+ # The customer's name.
12
+ attr_accessor :name
13
+ # The customer's phone number.
14
+ attr_accessor :phone
15
+
16
+ def initialize(customer: nil, email: nil, name: nil, phone: nil)
17
+ @customer = customer
18
+ @email = email
19
+ @name = name
20
+ @phone = phone
21
+ end
22
+ end
23
+
24
+ class ShippingDetails < ::Stripe::RequestParams
25
+ class Address < ::Stripe::RequestParams
26
+ # City, district, suburb, town, or village.
27
+ attr_accessor :city
28
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
29
+ attr_accessor :country
30
+ # Address line 1, such as the street, PO Box, or company name.
31
+ attr_accessor :line1
32
+ # Address line 2, such as the apartment, suite, unit, or building.
33
+ attr_accessor :line2
34
+ # ZIP or postal code.
35
+ attr_accessor :postal_code
36
+ # State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
37
+ attr_accessor :state
38
+
39
+ def initialize(
40
+ city: nil,
41
+ country: nil,
42
+ line1: nil,
43
+ line2: nil,
44
+ postal_code: nil,
45
+ state: nil
46
+ )
47
+ @city = city
48
+ @country = country
49
+ @line1 = line1
50
+ @line2 = line2
51
+ @postal_code = postal_code
52
+ @state = state
53
+ end
54
+ end
55
+ # The physical shipping address.
56
+ attr_accessor :address
57
+ # The shipping recipient's name.
58
+ attr_accessor :name
59
+ # The shipping recipient's phone number.
60
+ attr_accessor :phone
61
+
62
+ def initialize(address: nil, name: nil, phone: nil)
63
+ @address = address
64
+ @name = name
65
+ @phone = phone
66
+ end
67
+ end
68
+ # Customer information for this payment.
69
+ attr_accessor :customer_details
70
+ # An arbitrary string attached to the object. Often useful for displaying to users.
71
+ attr_accessor :description
72
+ # Specifies which fields in the response should be expanded.
73
+ attr_accessor :expand
74
+ # Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
75
+ attr_accessor :metadata
76
+ # Shipping information for this payment.
77
+ attr_accessor :shipping_details
78
+
79
+ def initialize(
80
+ customer_details: nil,
81
+ description: nil,
82
+ expand: nil,
83
+ metadata: nil,
84
+ shipping_details: nil
85
+ )
86
+ @customer_details = customer_details
87
+ @description = description
88
+ @expand = expand
89
+ @metadata = metadata
90
+ @shipping_details = shipping_details
91
+ end
92
+ end
93
+ end
@@ -0,0 +1,79 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ class PaymentAttemptRecordReportRefundParams < ::Stripe::RequestParams
6
+ class Amount < ::Stripe::RequestParams
7
+ # 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).
8
+ attr_accessor :currency
9
+ # A positive integer representing the amount in the currency's [minor unit](https://docs.stripe.com/currencies#zero-decimal). For example, `100` can represent 1 USD or 100 JPY.
10
+ attr_accessor :value
11
+
12
+ def initialize(currency: nil, value: nil)
13
+ @currency = currency
14
+ @value = value
15
+ end
16
+ end
17
+
18
+ class ProcessorDetails < ::Stripe::RequestParams
19
+ class Custom < ::Stripe::RequestParams
20
+ # A reference to the external refund. This field must be unique across all refunds.
21
+ attr_accessor :refund_reference
22
+
23
+ def initialize(refund_reference: nil)
24
+ @refund_reference = refund_reference
25
+ end
26
+ end
27
+ # Information about the custom processor used to make this refund.
28
+ attr_accessor :custom
29
+ # The type of the processor details. An additional hash is included on processor_details with a name matching this value. It contains additional information specific to the processor.
30
+ attr_accessor :type
31
+
32
+ def initialize(custom: nil, type: nil)
33
+ @custom = custom
34
+ @type = type
35
+ end
36
+ end
37
+
38
+ class Refunded < ::Stripe::RequestParams
39
+ # When the reported refund completed. Measured in seconds since the Unix epoch.
40
+ attr_accessor :refunded_at
41
+
42
+ def initialize(refunded_at: nil)
43
+ @refunded_at = refunded_at
44
+ end
45
+ end
46
+ # A positive integer in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal) representing how much of this payment to refund. Can refund only up to the remaining, unrefunded amount of the payment.
47
+ attr_accessor :amount
48
+ # Specifies which fields in the response should be expanded.
49
+ attr_accessor :expand
50
+ # When the reported refund was initiated. Measured in seconds since the Unix epoch.
51
+ attr_accessor :initiated_at
52
+ # Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
53
+ attr_accessor :metadata
54
+ # The outcome of the reported refund.
55
+ attr_accessor :outcome
56
+ # Processor information for this refund.
57
+ attr_accessor :processor_details
58
+ # Information about the payment attempt refund.
59
+ attr_accessor :refunded
60
+
61
+ def initialize(
62
+ amount: nil,
63
+ expand: nil,
64
+ initiated_at: nil,
65
+ metadata: nil,
66
+ outcome: nil,
67
+ processor_details: nil,
68
+ refunded: nil
69
+ )
70
+ @amount = amount
71
+ @expand = expand
72
+ @initiated_at = initiated_at
73
+ @metadata = metadata
74
+ @outcome = outcome
75
+ @processor_details = processor_details
76
+ @refunded = refunded
77
+ end
78
+ end
79
+ end
@@ -3190,6 +3190,14 @@ module Stripe
3190
3190
  end
3191
3191
 
3192
3192
  class Crypto < ::Stripe::RequestParams
3193
+ class DepositOptions < ::Stripe::RequestParams
3194
+ # The blockchain networks to support for deposits. Learn more about [supported networks and tokens](https://docs.stripe.com/payments/deposit-mode-stablecoin-payments#token-and-network-support).
3195
+ attr_accessor :networks
3196
+
3197
+ def initialize(networks: nil)
3198
+ @networks = networks
3199
+ end
3200
+ end
3193
3201
  # Indicates that you intend to make future payments with this PaymentIntent's payment method.
3194
3202
  #
3195
3203
  # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
@@ -3200,9 +3208,15 @@ module Stripe
3200
3208
  #
3201
3209
  # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
3202
3210
  attr_accessor :setup_future_usage
3211
+ # Specific configuration for this PaymentIntent when the mode is `deposit`.
3212
+ attr_accessor :deposit_options
3213
+ # The mode of the crypto payment.
3214
+ attr_accessor :mode
3203
3215
 
3204
- def initialize(setup_future_usage: nil)
3216
+ def initialize(setup_future_usage: nil, deposit_options: nil, mode: nil)
3205
3217
  @setup_future_usage = setup_future_usage
3218
+ @deposit_options = deposit_options
3219
+ @mode = mode
3206
3220
  end
3207
3221
  end
3208
3222
 
@@ -3204,6 +3204,14 @@ module Stripe
3204
3204
  end
3205
3205
 
3206
3206
  class Crypto < ::Stripe::RequestParams
3207
+ class DepositOptions < ::Stripe::RequestParams
3208
+ # The blockchain networks to support for deposits. Learn more about [supported networks and tokens](https://docs.stripe.com/payments/deposit-mode-stablecoin-payments#token-and-network-support).
3209
+ attr_accessor :networks
3210
+
3211
+ def initialize(networks: nil)
3212
+ @networks = networks
3213
+ end
3214
+ end
3207
3215
  # Indicates that you intend to make future payments with this PaymentIntent's payment method.
3208
3216
  #
3209
3217
  # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
@@ -3214,9 +3222,15 @@ module Stripe
3214
3222
  #
3215
3223
  # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
3216
3224
  attr_accessor :setup_future_usage
3225
+ # Specific configuration for this PaymentIntent when the mode is `deposit`.
3226
+ attr_accessor :deposit_options
3227
+ # The mode of the crypto payment.
3228
+ attr_accessor :mode
3217
3229
 
3218
- def initialize(setup_future_usage: nil)
3230
+ def initialize(setup_future_usage: nil, deposit_options: nil, mode: nil)
3219
3231
  @setup_future_usage = setup_future_usage
3232
+ @deposit_options = deposit_options
3233
+ @mode = mode
3220
3234
  end
3221
3235
  end
3222
3236
 
@@ -0,0 +1,31 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ class PaymentIntentSimulateCryptoDepositParams < ::Stripe::RequestParams
6
+ # The buyer's wallet address from which the crypto deposit is originating.
7
+ attr_accessor :buyer_wallet
8
+ # Specifies which fields in the response should be expanded.
9
+ attr_accessor :expand
10
+ # The blockchain network of the simulated crypto deposit.
11
+ attr_accessor :network
12
+ # The token currency of the simulated crypto deposit.
13
+ attr_accessor :token_currency
14
+ # A testmode transaction hash that determines the outcome of the simulated deposit.
15
+ attr_accessor :transaction_hash
16
+
17
+ def initialize(
18
+ buyer_wallet: nil,
19
+ expand: nil,
20
+ network: nil,
21
+ token_currency: nil,
22
+ transaction_hash: nil
23
+ )
24
+ @buyer_wallet = buyer_wallet
25
+ @expand = expand
26
+ @network = network
27
+ @token_currency = token_currency
28
+ @transaction_hash = transaction_hash
29
+ end
30
+ end
31
+ end