stripe 19.4.0.pre.alpha.3 → 19.4.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 (65) hide show
  1. checksums.yaml +4 -4
  2. data/lib/stripe/api_requestor.rb +2 -27
  3. data/lib/stripe/error_object.rb +48 -19
  4. data/lib/stripe/object_types.rb +0 -1
  5. data/lib/stripe/params/account_create_params.rb +2 -0
  6. data/lib/stripe/params/account_person_create_params.rb +6 -0
  7. data/lib/stripe/params/account_person_update_params.rb +6 -0
  8. data/lib/stripe/params/account_session_create_params.rb +0 -42
  9. data/lib/stripe/params/account_update_params.rb +2 -0
  10. data/lib/stripe/params/billing_portal/configuration_create_params.rb +1 -1
  11. data/lib/stripe/params/billing_portal/configuration_update_params.rb +1 -1
  12. data/lib/stripe/params/invoice_create_preview_params.rb +1 -1
  13. data/lib/stripe/params/issuing/authorization_capture_params.rb +1 -1
  14. data/lib/stripe/params/issuing/authorization_create_params.rb +1 -1
  15. data/lib/stripe/params/issuing/authorization_finalize_amount_params.rb +1 -1
  16. data/lib/stripe/params/issuing/transaction_create_force_capture_params.rb +1 -1
  17. data/lib/stripe/params/issuing/transaction_create_unlinked_refund_params.rb +1 -1
  18. data/lib/stripe/params/payment_record_create_params.rb +109 -0
  19. data/lib/stripe/params/refund_create_params.rb +4 -0
  20. data/lib/stripe/params/subscription_schedule_create_params.rb +136 -0
  21. data/lib/stripe/params/subscription_schedule_update_params.rb +137 -1
  22. data/lib/stripe/params/test_helpers/issuing/authorization_capture_params.rb +1 -1
  23. data/lib/stripe/params/test_helpers/issuing/authorization_create_params.rb +1 -1
  24. data/lib/stripe/params/test_helpers/issuing/authorization_finalize_amount_params.rb +1 -1
  25. data/lib/stripe/params/test_helpers/issuing/transaction_create_force_capture_params.rb +1 -1
  26. data/lib/stripe/params/test_helpers/issuing/transaction_create_unlinked_refund_params.rb +1 -1
  27. data/lib/stripe/params/token_create_params.rb +8 -0
  28. data/lib/stripe/params.rb +2 -8
  29. data/lib/stripe/resources/account_session.rb +8 -0
  30. data/lib/stripe/resources/balance_transaction.rb +1 -1
  31. data/lib/stripe/resources/billing_portal/configuration.rb +1 -1
  32. data/lib/stripe/resources/checkout/session.rb +2 -2
  33. data/lib/stripe/resources/financial_connections/session.rb +3 -0
  34. data/lib/stripe/resources/invoice.rb +1 -1
  35. data/lib/stripe/resources/issuing/card.rb +2 -0
  36. data/lib/stripe/resources/issuing/transaction.rb +2 -2
  37. data/lib/stripe/resources/order.rb +1 -1
  38. data/lib/stripe/resources/payment_method.rb +2 -2
  39. data/lib/stripe/resources/payment_record.rb +12 -0
  40. data/lib/stripe/resources/profile.rb +14 -14
  41. data/lib/stripe/resources/quote_preview_invoice.rb +1 -1
  42. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +125 -0
  43. data/lib/stripe/resources/shared_payment/issued_token.rb +18 -1
  44. data/lib/stripe/resources/subscription_schedule.rb +125 -0
  45. data/lib/stripe/resources/tax/calculation.rb +1 -1
  46. data/lib/stripe/resources/tax/transaction.rb +1 -1
  47. data/lib/stripe/resources/v2/signals/account_signal.rb +4 -1
  48. data/lib/stripe/resources.rb +0 -2
  49. data/lib/stripe/services/account_person_service.rb +1 -1
  50. data/lib/stripe/services/payment_method_service.rb +1 -1
  51. data/lib/stripe/services/payment_record_service.rb +12 -0
  52. data/lib/stripe/services/v1_services.rb +1 -2
  53. data/lib/stripe/services/v2/signals/account_signal_service.rb +1 -1
  54. data/lib/stripe/services.rb +0 -2
  55. data/lib/stripe/telemetry_id.rb +65 -0
  56. data/lib/stripe/version.rb +1 -1
  57. data/lib/stripe.rb +2 -0
  58. data/rbi/stripe.rbi +985 -384
  59. metadata +4 -8
  60. data/lib/stripe/params/fr_meal_vouchers_onboarding_create_params.rb +0 -25
  61. data/lib/stripe/params/fr_meal_vouchers_onboarding_list_params.rb +0 -22
  62. data/lib/stripe/params/fr_meal_vouchers_onboarding_retrieve_params.rb +0 -13
  63. data/lib/stripe/params/fr_meal_vouchers_onboarding_update_params.rb +0 -16
  64. data/lib/stripe/resources/fr_meal_vouchers_onboarding.rb +0 -153
  65. data/lib/stripe/services/fr_meal_vouchers_onboarding_service.rb +0 -57
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dc92f0d6b95ef6c9484b61852f7651c905cd76bc63c93530c2b5d0a9967f496e
4
- data.tar.gz: 69dfe990e13f1ab11530560c136f5b14378d754d66c66d99f0c8b9444743270a
3
+ metadata.gz: 5ec34b53e2090ab7a8af3f69f574820939b0bc23f8b1a8895b0c355f96abf37a
4
+ data.tar.gz: 28e37f5e79fef37fc7862e32a7df4e63ab030b01d0ca2b3e8435f8f150b1f2ed
5
5
  SHA512:
6
- metadata.gz: 202a8909d9d0bbe087f1ec32cff0c3306946bc0abfc05bd8321fa2b10d2fe483cebdfefa85c7db9a9851130de1218c679338238d597942eb7f97771bdc9c52ea
7
- data.tar.gz: 4ed2df46a47f2a8a414bca75565604f267344c32367a18a6f24eb9f6e0056522e97b6ecabc203bea7e9f7f58bcac7f801d7b475d81ca12649214ac8819b5997e
6
+ metadata.gz: 5ad5a74aac25aa0a128959767d31b8edfcb9acd9d44ba7f860864459c59008fa930f594577982922da4adcdbb93d897b672c08ed7c26d6ed3e7b46519d813c13
7
+ data.tar.gz: 3f2430afb45d077ddbbc0669d9ea29b582589cd50e7f286fe66f6e4068181649e36c6d022f4190ec97f4bb30f813c52e813a8471d14f987310475145a7189407
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "digest"
4
3
  require "socket"
5
4
  require "stripe/instrumentation"
6
5
 
@@ -1106,31 +1105,6 @@ module Stripe
1106
1105
  # in so that we can generate a rich user agent header to help debug
1107
1106
  # integrations.
1108
1107
  class SystemProfiler
1109
- UNAME_HASH = begin
1110
- parts = []
1111
- parts << if RUBY_PLATFORM.match?(/mswin|mingw|cygwin/)
1112
- begin
1113
- `ver 2>NUL`.strip
1114
- rescue StandardError
1115
- ""
1116
- end
1117
- else
1118
- begin
1119
- `uname -a 2>/dev/null`.strip
1120
- rescue StandardError
1121
- ""
1122
- end
1123
- end
1124
- parts << begin
1125
- Socket.gethostname
1126
- rescue StandardError
1127
- ""
1128
- end
1129
- Digest::MD5.hexdigest(parts.join(" "))
1130
- rescue StandardError
1131
- ""
1132
- end
1133
-
1134
1108
  AI_AGENTS = [
1135
1109
  # aiAgents: The beginning of the section generated from our OpenAPI spec
1136
1110
  %w[ANTIGRAVITY_CLI_ALIAS antigravity],
@@ -1168,7 +1142,8 @@ module Stripe
1168
1142
 
1169
1143
  if Stripe.enable_telemetry?
1170
1144
  ua[:platform] = RUBY_PLATFORM
1171
- ua[:source] = UNAME_HASH unless UNAME_HASH.empty?
1145
+ tid = TelemetryId.get
1146
+ ua[:telemetry_id] = tid if tid
1172
1147
  end
1173
1148
 
1174
1149
  ai_agent = detect_ai_agent
@@ -11,69 +11,98 @@ module Stripe
11
11
  # methods would cause users to run into `NoMethodError` exceptions and
12
12
  # get in the way of generic error handling.
13
13
 
14
+ # errorFields: The beginning of the section generated from our OpenAPI spec
15
+ # For card errors resulting from a card issuer decline, a short string indicating [how to proceed with an error](https://docs.stripe.com/declines#retrying-issuer-declines) if they provide one.
16
+ def advice_code
17
+ @values[:advice_code]
18
+ end
19
+
14
20
  # For card errors, the ID of the failed charge.
15
21
  def charge
16
22
  @values[:charge]
17
23
  end
18
24
 
19
- # For some errors that could be handled programmatically, a short string
20
- # indicating the error code reported.
25
+ # For some errors that could be handled programmatically, a short string indicating the [error code](https://docs.stripe.com/error-codes) reported.
21
26
  def code
22
27
  @values[:code]
23
28
  end
24
29
 
25
- # For card errors resulting from a card issuer decline, a short string
26
- # indicating the card issuer's reason for the decline if they provide one.
30
+ # For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://docs.stripe.com/declines#issuer-declines) if they provide one.
27
31
  def decline_code
28
32
  @values[:decline_code]
29
33
  end
30
34
 
31
- # A URL to more information about the error code reported.
35
+ # A URL to more information about the [error code](https://docs.stripe.com/error-codes) reported.
32
36
  def doc_url
33
37
  @values[:doc_url]
34
38
  end
35
39
 
36
- # A human-readable message providing more details about the error. For card
37
- # errors, these messages can be shown to your users.
40
+ # The GiftCardOperation object for errors returned on a request involving a GiftCardOperation.
41
+ def gift_card_operation
42
+ @values[:gift_card_operation]
43
+ end
44
+
45
+ # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users.
38
46
  def message
39
47
  @values[:message]
40
48
  end
41
49
 
42
- # If the error is parameter-specific, the parameter related to the error.
43
- # For example, you can use this to display a message near the correct form
44
- # field.
50
+ # For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error.
51
+ def network_advice_code
52
+ @values[:network_advice_code]
53
+ end
54
+
55
+ # For payments declined by the network, an alphanumeric code which indicates the reason the payment failed.
56
+ def network_decline_code
57
+ @values[:network_decline_code]
58
+ end
59
+
60
+ # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field.
45
61
  def param
46
62
  @values[:param]
47
63
  end
48
64
 
49
- # The PaymentIntent object for errors returned on a request involving a
50
- # PaymentIntent.
65
+ # The PaymentIntent object for errors returned on a request involving a PaymentIntent.
51
66
  def payment_intent
52
67
  @values[:payment_intent]
53
68
  end
54
69
 
55
- # The PaymentMethod object for errors returned on a request involving a
56
- # PaymentMethod.
70
+ # The PaymentMethod object for errors returned on a request involving a PaymentMethod.
57
71
  def payment_method
58
72
  @values[:payment_method]
59
73
  end
60
74
 
61
- # The SetupIntent object for errors returned on a request involving a
62
- # SetupIntent.
75
+ # If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors.
76
+ def payment_method_type
77
+ @values[:payment_method_type]
78
+ end
79
+
80
+ # A URL to the request log entry in your dashboard.
81
+ def request_log_url
82
+ @values[:request_log_url]
83
+ end
84
+
85
+ # The SetupIntent object for errors returned on a request involving a SetupIntent.
63
86
  def setup_intent
64
87
  @values[:setup_intent]
65
88
  end
66
89
 
67
- # The source object for errors returned on a request involving a source.
90
+ # The PaymentSource object for errors returned on a request involving a PaymentSource.
68
91
  def source
69
92
  @values[:source]
70
93
  end
71
94
 
72
- # The type of error returned. One of `api_error`, `card_error`,
73
- # `idempotency_error`, or `invalid_request_error`.
95
+ # The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error`
74
96
  def type
75
97
  @values[:type]
76
98
  end
99
+
100
+ # The user message associated with the error.
101
+ def user_message
102
+ @values[:user_message]
103
+ end
104
+
105
+ # errorFields: The end of the section generated from our OpenAPI spec
77
106
  end
78
107
 
79
108
  # Represents on OAuth error returned by the OAuth API.
@@ -90,7 +90,6 @@ module Stripe
90
90
  FinancialConnections::Session.object_name => FinancialConnections::Session,
91
91
  FinancialConnections::Transaction.object_name => FinancialConnections::Transaction,
92
92
  Forwarding::Request.object_name => Forwarding::Request,
93
- FrMealVouchersOnboarding.object_name => FrMealVouchersOnboarding,
94
93
  FundingInstructions.object_name => FundingInstructions,
95
94
  FxQuote.object_name => FxQuote,
96
95
  GiftCard.object_name => GiftCard,
@@ -1508,6 +1508,8 @@ module Stripe
1508
1508
  # The category identifying the legal structure of the company or legal entity. See [Business structure](/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value.
1509
1509
  attr_accessor :structure
1510
1510
  # The business ID number of the company, as appropriate for the company’s country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.)
1511
+ #
1512
+ # Changing this value requires that the account re-accept the [terms of service](/api/accounts/object#account_object-tos_acceptance).
1511
1513
  attr_accessor :tax_id
1512
1514
  # The jurisdiction in which the `tax_id` is registered (Germany-based companies only).
1513
1515
  attr_accessor :tax_id_registrar
@@ -388,8 +388,12 @@ module Stripe
388
388
  # The person's gender (International regulations require either "male" or "female").
389
389
  attr_accessor :gender
390
390
  # The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii).
391
+ #
392
+ # Changing this value for the account's representative requires that the account re-accept the [terms of service](/api/accounts/object#account_object-tos_acceptance).
391
393
  attr_accessor :id_number
392
394
  # The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii).
395
+ #
396
+ # Changing this value for the account's representative requires that the account re-accept the [terms of service](/api/accounts/object#account_object-tos_acceptance).
393
397
  attr_accessor :id_number_secondary
394
398
  # The person's last name.
395
399
  attr_accessor :last_name
@@ -418,6 +422,8 @@ module Stripe
418
422
  # The credit applicant's self-reported monthly housing payment in minor units.
419
423
  attr_accessor :self_reported_monthly_housing_payment
420
424
  # The last four digits of the person's Social Security number (U.S. only).
425
+ #
426
+ # Changing this value for the account's representative requires that the account re-accept the [terms of service](/api/accounts/object#account_object-tos_acceptance).
421
427
  attr_accessor :ssn_last_4
422
428
  # Demographic data related to the person.
423
429
  attr_accessor :us_cfpb_data
@@ -388,8 +388,12 @@ module Stripe
388
388
  # The person's gender (International regulations require either "male" or "female").
389
389
  attr_accessor :gender
390
390
  # The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii).
391
+ #
392
+ # Changing this value for the account's representative requires that the account re-accept the [terms of service](/api/accounts/object#account_object-tos_acceptance).
391
393
  attr_accessor :id_number
392
394
  # The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii).
395
+ #
396
+ # Changing this value for the account's representative requires that the account re-accept the [terms of service](/api/accounts/object#account_object-tos_acceptance).
393
397
  attr_accessor :id_number_secondary
394
398
  # The person's last name.
395
399
  attr_accessor :last_name
@@ -418,6 +422,8 @@ module Stripe
418
422
  # The credit applicant's self-reported monthly housing payment in minor units.
419
423
  attr_accessor :self_reported_monthly_housing_payment
420
424
  # The last four digits of the person's Social Security number (U.S. only).
425
+ #
426
+ # Changing this value for the account's representative requires that the account re-accept the [terms of service](/api/accounts/object#account_object-tos_acceptance).
421
427
  attr_accessor :ssn_last_4
422
428
  # Demographic data related to the person.
423
429
  attr_accessor :us_cfpb_data
@@ -340,26 +340,6 @@ module Stripe
340
340
  end
341
341
  end
342
342
 
343
- class FinancialAccounts < ::Stripe::RequestParams
344
- class Features < ::Stripe::RequestParams; end
345
- # Attribute for param field features
346
- attr_accessor :features
347
-
348
- def initialize(features: nil)
349
- @features = features
350
- end
351
- end
352
-
353
- class FinancialAccountsTransactions < ::Stripe::RequestParams
354
- class Features < ::Stripe::RequestParams; end
355
- # Attribute for param field features
356
- attr_accessor :features
357
-
358
- def initialize(features: nil)
359
- @features = features
360
- end
361
- end
362
-
363
343
  class InstantPayoutsPromotion < ::Stripe::RequestParams
364
344
  class Features < ::Stripe::RequestParams
365
345
  # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`.
@@ -706,16 +686,6 @@ module Stripe
706
686
  end
707
687
  end
708
688
 
709
- class RecipientsList < ::Stripe::RequestParams
710
- class Features < ::Stripe::RequestParams; end
711
- # Attribute for param field features
712
- attr_accessor :features
713
-
714
- def initialize(features: nil)
715
- @features = features
716
- end
717
- end
718
-
719
689
  class ReportingChart < ::Stripe::RequestParams
720
690
  class Features < ::Stripe::RequestParams; end
721
691
  # Whether the embedded component is enabled.
@@ -827,10 +797,6 @@ module Stripe
827
797
  attr_accessor :financial_account
828
798
  # Configuration for the [financial account transactions](/connect/supported-embedded-components/financial-account-transactions/) embedded component.
829
799
  attr_accessor :financial_account_transactions
830
- # Configuration for the [financial accounts](/connect/supported-embedded-components/financial-accounts/) embedded component.
831
- attr_accessor :financial_accounts
832
- # Configuration for the [financial accounts transactions](/connect/supported-embedded-components/financial-accounts-transactions/) embedded component.
833
- attr_accessor :financial_accounts_transactions
834
800
  # Configuration for the [instant payouts promotion](/connect/supported-embedded-components/instant-payouts-promotion/) embedded component.
835
801
  attr_accessor :instant_payouts_promotion
836
802
  # Configuration for the [issuing card](/connect/supported-embedded-components/issuing-card/) embedded component.
@@ -859,8 +825,6 @@ module Stripe
859
825
  attr_accessor :product_tax_code_selector
860
826
  # Configuration for the [recipients](/connect/supported-embedded-components/recipients/) embedded component.
861
827
  attr_accessor :recipients
862
- # Configuration for the [recipients list](/connect/supported-embedded-components/recipients-list/) embedded component.
863
- attr_accessor :recipients_list
864
828
  # Configuration for the [reporting chart](/connect/supported-embedded-components/reporting-chart/) embedded component.
865
829
  attr_accessor :reporting_chart
866
830
  # Configuration for the [tax registrations](/connect/supported-embedded-components/tax-registrations/) embedded component.
@@ -892,8 +856,6 @@ module Stripe
892
856
  export_tax_transactions: nil,
893
857
  financial_account: nil,
894
858
  financial_account_transactions: nil,
895
- financial_accounts: nil,
896
- financial_accounts_transactions: nil,
897
859
  instant_payouts_promotion: nil,
898
860
  issuing_card: nil,
899
861
  issuing_cards_list: nil,
@@ -908,7 +870,6 @@ module Stripe
908
870
  payouts_list: nil,
909
871
  product_tax_code_selector: nil,
910
872
  recipients: nil,
911
- recipients_list: nil,
912
873
  reporting_chart: nil,
913
874
  tax_registrations: nil,
914
875
  tax_settings: nil,
@@ -933,8 +894,6 @@ module Stripe
933
894
  @export_tax_transactions = export_tax_transactions
934
895
  @financial_account = financial_account
935
896
  @financial_account_transactions = financial_account_transactions
936
- @financial_accounts = financial_accounts
937
- @financial_accounts_transactions = financial_accounts_transactions
938
897
  @instant_payouts_promotion = instant_payouts_promotion
939
898
  @issuing_card = issuing_card
940
899
  @issuing_cards_list = issuing_cards_list
@@ -949,7 +908,6 @@ module Stripe
949
908
  @payouts_list = payouts_list
950
909
  @product_tax_code_selector = product_tax_code_selector
951
910
  @recipients = recipients
952
- @recipients_list = recipients_list
953
911
  @reporting_chart = reporting_chart
954
912
  @tax_registrations = tax_registrations
955
913
  @tax_settings = tax_settings
@@ -1508,6 +1508,8 @@ module Stripe
1508
1508
  # The category identifying the legal structure of the company or legal entity. See [Business structure](/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value.
1509
1509
  attr_accessor :structure
1510
1510
  # The business ID number of the company, as appropriate for the company’s country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.)
1511
+ #
1512
+ # Changing this value requires that the account re-accept the [terms of service](/api/accounts/object#account_object-tos_acceptance).
1511
1513
  attr_accessor :tax_id
1512
1514
  # The jurisdiction in which the `tax_id` is registered (Germany-based companies only).
1513
1515
  attr_accessor :tax_id_registrar
@@ -197,7 +197,7 @@ module Stripe
197
197
  end
198
198
  # The business information shown to customers in the portal.
199
199
  attr_accessor :business_profile
200
- # The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session.
200
+ # The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overridden](https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session.
201
201
  attr_accessor :default_return_url
202
202
  # Specifies which fields in the response should be expanded.
203
203
  attr_accessor :expand
@@ -201,7 +201,7 @@ module Stripe
201
201
  attr_accessor :active
202
202
  # The business information shown to customers in the portal.
203
203
  attr_accessor :business_profile
204
- # The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session.
204
+ # The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overridden](https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session.
205
205
  attr_accessor :default_return_url
206
206
  # Specifies which fields in the response should be expanded.
207
207
  attr_accessor :expand
@@ -1820,7 +1820,7 @@ module Stripe
1820
1820
  attr_accessor :trial
1821
1821
  # Specify trial behavior when crossing phase boundaries
1822
1822
  attr_accessor :trial_continuation
1823
- # Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial`
1823
+ # Sets the phase to trialing from the start date to this date. Must be within the phase. When previewing an update, if combined with `trial=true`, it must match the phase end date.
1824
1824
  attr_accessor :trial_end
1825
1825
  # Settings related to subscription trials.
1826
1826
  attr_accessor :trial_settings
@@ -44,7 +44,7 @@ module Stripe
44
44
 
45
45
  class ReportedBreakdown < ::Stripe::RequestParams
46
46
  class Fuel < ::Stripe::RequestParams
47
- # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes.
47
+ # Gross fuel amount that should equal Fuel Volume multiplied by Fuel Unit Cost, inclusive of taxes.
48
48
  attr_accessor :gross_amount_decimal
49
49
 
50
50
  def initialize(gross_amount_decimal: nil)
@@ -46,7 +46,7 @@ module Stripe
46
46
 
47
47
  class ReportedBreakdown < ::Stripe::RequestParams
48
48
  class Fuel < ::Stripe::RequestParams
49
- # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes.
49
+ # Gross fuel amount that should equal Fuel Volume multiplied by Fuel Unit Cost, inclusive of taxes.
50
50
  attr_accessor :gross_amount_decimal
51
51
 
52
52
  def initialize(gross_amount_decimal: nil)
@@ -34,7 +34,7 @@ module Stripe
34
34
 
35
35
  class ReportedBreakdown < ::Stripe::RequestParams
36
36
  class Fuel < ::Stripe::RequestParams
37
- # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes.
37
+ # Gross fuel amount that should equal Fuel Volume multiplied by Fuel Unit Cost, inclusive of taxes.
38
38
  attr_accessor :gross_amount_decimal
39
39
 
40
40
  def initialize(gross_amount_decimal: nil)
@@ -95,7 +95,7 @@ module Stripe
95
95
 
96
96
  class ReportedBreakdown < ::Stripe::RequestParams
97
97
  class Fuel < ::Stripe::RequestParams
98
- # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes.
98
+ # Gross fuel amount that should equal Fuel Volume multiplied by Fuel Unit Cost, inclusive of taxes.
99
99
  attr_accessor :gross_amount_decimal
100
100
 
101
101
  def initialize(gross_amount_decimal: nil)
@@ -86,7 +86,7 @@ module Stripe
86
86
 
87
87
  class ReportedBreakdown < ::Stripe::RequestParams
88
88
  class Fuel < ::Stripe::RequestParams
89
- # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes.
89
+ # Gross fuel amount that should equal Fuel Volume multiplied by Fuel Unit Cost, inclusive of taxes.
90
90
  attr_accessor :gross_amount_decimal
91
91
 
92
92
  def initialize(gross_amount_decimal: nil)
@@ -0,0 +1,109 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ class PaymentRecordCreateParams < ::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 Closed < ::Stripe::RequestParams
19
+ # When the dispute was closed. Measured in seconds since the Unix epoch.
20
+ attr_accessor :closed_at
21
+
22
+ def initialize(closed_at: nil)
23
+ @closed_at = closed_at
24
+ end
25
+ end
26
+
27
+ class Funded < ::Stripe::RequestParams
28
+ class Amount < ::Stripe::RequestParams
29
+ # 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).
30
+ attr_accessor :currency
31
+ # 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.
32
+ attr_accessor :value
33
+
34
+ def initialize(currency: nil, value: nil)
35
+ @currency = currency
36
+ @value = value
37
+ end
38
+ end
39
+ # The amount that has been lost to the customer due to disputes on this payment.
40
+ attr_accessor :amount
41
+ # When the dispute funding event occurred. Measured in seconds since the Unix epoch.
42
+ attr_accessor :funded_at
43
+ # The type of dispute funding event.
44
+ attr_accessor :type
45
+
46
+ def initialize(amount: nil, funded_at: nil, type: nil)
47
+ @amount = amount
48
+ @funded_at = funded_at
49
+ @type = type
50
+ end
51
+ end
52
+
53
+ class ProcessorDetails < ::Stripe::RequestParams
54
+ class Custom < ::Stripe::RequestParams
55
+ # A reference to the external dispute. This field must be unique across all disputes.
56
+ attr_accessor :dispute_reference
57
+
58
+ def initialize(dispute_reference: nil)
59
+ @dispute_reference = dispute_reference
60
+ end
61
+ end
62
+ # Information about the custom processor used to make this payment.
63
+ attr_accessor :custom
64
+ # 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.
65
+ attr_accessor :type
66
+
67
+ def initialize(custom: nil, type: nil)
68
+ @custom = custom
69
+ @type = type
70
+ end
71
+ end
72
+ # The amount that has been lost to the customer due to disputes on this payment.
73
+ attr_accessor :amount
74
+ # Information about the dispute closing.
75
+ attr_accessor :closed
76
+ # Specifies which fields in the response should be expanded.
77
+ attr_accessor :expand
78
+ # Information about the dispute funding event.
79
+ attr_accessor :funded
80
+ # When the reported payment was initiated. Measured in seconds since the Unix epoch.
81
+ attr_accessor :initiated_at
82
+ # 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`.
83
+ attr_accessor :metadata
84
+ # Processor information for this payment.
85
+ attr_accessor :processor_details
86
+ # The reason the payment was disputed.
87
+ attr_accessor :reason
88
+
89
+ def initialize(
90
+ amount: nil,
91
+ closed: nil,
92
+ expand: nil,
93
+ funded: nil,
94
+ initiated_at: nil,
95
+ metadata: nil,
96
+ processor_details: nil,
97
+ reason: nil
98
+ )
99
+ @amount = amount
100
+ @closed = closed
101
+ @expand = expand
102
+ @funded = funded
103
+ @initiated_at = initiated_at
104
+ @metadata = metadata
105
+ @processor_details = processor_details
106
+ @reason = reason
107
+ end
108
+ end
109
+ end
@@ -23,6 +23,8 @@ module Stripe
23
23
  attr_accessor :payment_attempt_record
24
24
  # The identifier of the PaymentIntent to refund.
25
25
  attr_accessor :payment_intent
26
+ # The identifier of the PaymentRecord to refund.
27
+ attr_accessor :payment_record
26
28
  # String indicating the reason for the refund. If set, possible values are `duplicate`, `fraudulent`, and `requested_by_customer`. If you believe the charge to be fraudulent, specifying `fraudulent` as the reason will add the associated card and email to your [block lists](https://docs.stripe.com/radar/lists), and will also help us improve our fraud detection algorithms.
27
29
  attr_accessor :reason
28
30
  # Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge.
@@ -41,6 +43,7 @@ module Stripe
41
43
  origin: nil,
42
44
  payment_attempt_record: nil,
43
45
  payment_intent: nil,
46
+ payment_record: nil,
44
47
  reason: nil,
45
48
  refund_application_fee: nil,
46
49
  reverse_transfer: nil
@@ -55,6 +58,7 @@ module Stripe
55
58
  @origin = origin
56
59
  @payment_attempt_record = payment_attempt_record
57
60
  @payment_intent = payment_intent
61
+ @payment_record = payment_record
58
62
  @reason = reason
59
63
  @refund_application_fee = refund_application_fee
60
64
  @reverse_transfer = reverse_transfer