stripe 15.5.0.pre.beta.2 → 15.6.0.pre.beta.1

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 (78) hide show
  1. checksums.yaml +4 -4
  2. data/API_VERSION +1 -1
  3. data/CHANGELOG.md +53 -1
  4. data/OPENAPI_VERSION +1 -1
  5. data/VERSION +1 -1
  6. data/lib/stripe/api_requestor.rb +18 -18
  7. data/lib/stripe/api_version.rb +1 -1
  8. data/lib/stripe/errors.rb +23 -23
  9. data/lib/stripe/resources/account.rb +2 -2
  10. data/lib/stripe/resources/account_session.rb +94 -13
  11. data/lib/stripe/resources/balance.rb +2 -7
  12. data/lib/stripe/resources/balance_settings.rb +72 -65
  13. data/lib/stripe/resources/billing/meter.rb +2 -2
  14. data/lib/stripe/resources/billing/meter_usage_row.rb +1 -1
  15. data/lib/stripe/resources/billing_portal/configuration.rb +12 -2
  16. data/lib/stripe/resources/charge.rb +40 -5
  17. data/lib/stripe/resources/checkout/session.rb +109 -5
  18. data/lib/stripe/resources/credit_note.rb +3 -3
  19. data/lib/stripe/resources/dispute.rb +1 -1
  20. data/lib/stripe/resources/file.rb +1 -1
  21. data/lib/stripe/resources/file_link.rb +1 -1
  22. data/lib/stripe/resources/invoice.rb +44 -1
  23. data/lib/stripe/resources/invoice_payment.rb +1 -1
  24. data/lib/stripe/resources/issuing/card.rb +8 -0
  25. data/lib/stripe/resources/mandate.rb +65 -1
  26. data/lib/stripe/resources/payment_attempt_record.rb +90 -10
  27. data/lib/stripe/resources/payment_intent.rb +182 -4
  28. data/lib/stripe/resources/payment_link.rb +1 -1
  29. data/lib/stripe/resources/payment_method.rb +2 -0
  30. data/lib/stripe/resources/payment_record.rb +111 -14
  31. data/lib/stripe/resources/promotion_code.rb +5 -2
  32. data/lib/stripe/resources/quote_preview_invoice.rb +1 -1
  33. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +24 -0
  34. data/lib/stripe/resources/setup_attempt.rb +4 -1
  35. data/lib/stripe/resources/setup_intent.rb +194 -1
  36. data/lib/stripe/resources/subscription.rb +107 -9
  37. data/lib/stripe/resources/subscription_schedule.rb +124 -2
  38. data/lib/stripe/resources/terminal/configuration.rb +82 -0
  39. data/lib/stripe/resources/terminal/reader.rb +22 -0
  40. data/lib/stripe/resources/v2/core/account.rb +8 -0
  41. data/lib/stripe/resources/v2/money_management/financial_account.rb +2 -0
  42. data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +1 -1
  43. data/lib/stripe/resources/v2/money_management/transaction.rb +2 -0
  44. data/lib/stripe/resources/v2/money_management/transaction_entry.rb +2 -0
  45. data/lib/stripe/services/account_session_service.rb +64 -13
  46. data/lib/stripe/services/balance_settings_service.rb +44 -41
  47. data/lib/stripe/services/billing/meter_service.rb +1 -1
  48. data/lib/stripe/services/billing_portal/configuration_service.rb +10 -2
  49. data/lib/stripe/services/checkout/session_service.rb +86 -4
  50. data/lib/stripe/services/credit_note_preview_lines_service.rb +1 -1
  51. data/lib/stripe/services/credit_note_service.rb +2 -2
  52. data/lib/stripe/services/customer_service.rb +4 -4
  53. data/lib/stripe/services/file_link_service.rb +1 -1
  54. data/lib/stripe/services/file_service.rb +1 -1
  55. data/lib/stripe/services/invoice_payment_service.rb +1 -1
  56. data/lib/stripe/services/invoice_service.rb +43 -0
  57. data/lib/stripe/services/issuing/card_service.rb +8 -0
  58. data/lib/stripe/services/mandate_service.rb +40 -0
  59. data/lib/stripe/services/payment_attempt_record_service.rb +4 -1
  60. data/lib/stripe/services/payment_intent_service.rb +157 -3
  61. data/lib/stripe/services/payment_link_service.rb +1 -1
  62. data/lib/stripe/services/payment_record_service.rb +25 -5
  63. data/lib/stripe/services/quote_service.rb +4 -4
  64. data/lib/stripe/services/setup_intent_service.rb +153 -0
  65. data/lib/stripe/services/subscription_schedule_service.rb +100 -2
  66. data/lib/stripe/services/subscription_service.rb +107 -9
  67. data/lib/stripe/services/terminal/configuration_service.rb +64 -0
  68. data/lib/stripe/services/test_helpers/terminal/reader_service.rb +22 -0
  69. data/lib/stripe/services/v1_services.rb +5 -5
  70. data/lib/stripe/services/v2/billing_service.rb +2 -2
  71. data/lib/stripe/services/v2/core/account_service.rb +16 -2
  72. data/lib/stripe/services/v2/core_service.rb +3 -3
  73. data/lib/stripe/services/v2/money_management/financial_account_service.rb +4 -1
  74. data/lib/stripe/services/v2/money_management_service.rb +3 -3
  75. data/lib/stripe/stripe_service.rb +3 -1
  76. data/lib/stripe/version.rb +1 -1
  77. data/rbi/stripe.rbi +142341 -140132
  78. metadata +2 -2
@@ -95,7 +95,7 @@ module Stripe
95
95
  attr_reader :message
96
96
  # 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.
97
97
  attr_reader :network_advice_code
98
- # For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed.
98
+ # For payments declined by the network, an alphanumeric code which indicates the reason the payment failed.
99
99
  attr_reader :network_decline_code
100
100
  # 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.
101
101
  attr_reader :param
@@ -1600,10 +1600,32 @@ module Stripe
1600
1600
  end
1601
1601
 
1602
1602
  class Pix < Stripe::StripeObject
1603
+ class MandateOptions < Stripe::StripeObject
1604
+ # Amount to be charged for future payments.
1605
+ attr_reader :amount
1606
+ # Determines if the amount includes the IOF tax.
1607
+ attr_reader :amount_includes_iof
1608
+ # Type of amount.
1609
+ attr_reader :amount_type
1610
+ # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
1611
+ attr_reader :currency
1612
+ # Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`.
1613
+ attr_reader :end_date
1614
+ # Schedule at which the future payments will be charged.
1615
+ attr_reader :payment_schedule
1616
+ # Subscription name displayed to buyers in their bank app.
1617
+ attr_reader :reference
1618
+ # Start date of the mandate, in `YYYY-MM-DD`.
1619
+ attr_reader :start_date
1620
+ end
1621
+ # Determines if the amount includes the IOF tax.
1622
+ attr_reader :amount_includes_iof
1603
1623
  # The number of seconds (between 10 and 1209600) after which Pix payment will expire.
1604
1624
  attr_reader :expires_after_seconds
1605
1625
  # The timestamp at which the Pix expires.
1606
1626
  attr_reader :expires_at
1627
+ # Attribute for field mandate_options
1628
+ attr_reader :mandate_options
1607
1629
  # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1608
1630
  #
1609
1631
  # 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.
@@ -4942,10 +4964,52 @@ module Stripe
4942
4964
  end
4943
4965
 
4944
4966
  class Pix < Stripe::RequestParams
4967
+ class MandateOptions < Stripe::RequestParams
4968
+ # Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000.
4969
+ attr_accessor :amount
4970
+ # Determines if the amount includes the IOF tax. Defaults to `never`.
4971
+ attr_accessor :amount_includes_iof
4972
+ # Type of amount. Defaults to `maximum`.
4973
+ attr_accessor :amount_type
4974
+ # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently.
4975
+ attr_accessor :currency
4976
+ # Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
4977
+ attr_accessor :end_date
4978
+ # Schedule at which the future payments will be charged. Defaults to `weekly`.
4979
+ attr_accessor :payment_schedule
4980
+ # Subscription name displayed to buyers in their bank app. Defaults to the displayable business name.
4981
+ attr_accessor :reference
4982
+ # Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date.
4983
+ attr_accessor :start_date
4984
+
4985
+ def initialize(
4986
+ amount: nil,
4987
+ amount_includes_iof: nil,
4988
+ amount_type: nil,
4989
+ currency: nil,
4990
+ end_date: nil,
4991
+ payment_schedule: nil,
4992
+ reference: nil,
4993
+ start_date: nil
4994
+ )
4995
+ @amount = amount
4996
+ @amount_includes_iof = amount_includes_iof
4997
+ @amount_type = amount_type
4998
+ @currency = currency
4999
+ @end_date = end_date
5000
+ @payment_schedule = payment_schedule
5001
+ @reference = reference
5002
+ @start_date = start_date
5003
+ end
5004
+ end
5005
+ # Determines if the amount includes the IOF tax. Defaults to `never`.
5006
+ attr_accessor :amount_includes_iof
4945
5007
  # The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds.
4946
5008
  attr_accessor :expires_after_seconds
4947
5009
  # The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future.
4948
5010
  attr_accessor :expires_at
5011
+ # Additional fields for mandate creation. Only applicable when `setup_future_usage=off_session`.
5012
+ attr_accessor :mandate_options
4949
5013
  # Indicates that you intend to make future payments with this PaymentIntent's payment method.
4950
5014
  #
4951
5015
  # 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.
@@ -4957,9 +5021,17 @@ module Stripe
4957
5021
  # 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`.
4958
5022
  attr_accessor :setup_future_usage
4959
5023
 
4960
- def initialize(expires_after_seconds: nil, expires_at: nil, setup_future_usage: nil)
5024
+ def initialize(
5025
+ amount_includes_iof: nil,
5026
+ expires_after_seconds: nil,
5027
+ expires_at: nil,
5028
+ mandate_options: nil,
5029
+ setup_future_usage: nil
5030
+ )
5031
+ @amount_includes_iof = amount_includes_iof
4961
5032
  @expires_after_seconds = expires_after_seconds
4962
5033
  @expires_at = expires_at
5034
+ @mandate_options = mandate_options
4963
5035
  @setup_future_usage = setup_future_usage
4964
5036
  end
4965
5037
  end
@@ -5670,6 +5742,8 @@ module Stripe
5670
5742
  attr_accessor :description
5671
5743
  # Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. Use this parameter for simpler integrations that don't handle customer actions, such as [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm).
5672
5744
  attr_accessor :error_on_requires_action
5745
+ # The list of payment method types to exclude from use with this payment.
5746
+ attr_accessor :excluded_payment_method_types
5673
5747
  # Specifies which fields in the response should be expanded.
5674
5748
  attr_accessor :expand
5675
5749
  # The FX rate in the quote is validated and used to convert the presentment amount to the settlement amount.
@@ -5750,6 +5824,7 @@ module Stripe
5750
5824
  customer_account: nil,
5751
5825
  description: nil,
5752
5826
  error_on_requires_action: nil,
5827
+ excluded_payment_method_types: nil,
5753
5828
  expand: nil,
5754
5829
  fx_quote: nil,
5755
5830
  hooks: nil,
@@ -5789,6 +5864,7 @@ module Stripe
5789
5864
  @customer_account = customer_account
5790
5865
  @description = description
5791
5866
  @error_on_requires_action = error_on_requires_action
5867
+ @excluded_payment_method_types = excluded_payment_method_types
5792
5868
  @expand = expand
5793
5869
  @fx_quote = fx_quote
5794
5870
  @hooks = hooks
@@ -8694,10 +8770,52 @@ module Stripe
8694
8770
  end
8695
8771
 
8696
8772
  class Pix < Stripe::RequestParams
8773
+ class MandateOptions < Stripe::RequestParams
8774
+ # Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000.
8775
+ attr_accessor :amount
8776
+ # Determines if the amount includes the IOF tax. Defaults to `never`.
8777
+ attr_accessor :amount_includes_iof
8778
+ # Type of amount. Defaults to `maximum`.
8779
+ attr_accessor :amount_type
8780
+ # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently.
8781
+ attr_accessor :currency
8782
+ # Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
8783
+ attr_accessor :end_date
8784
+ # Schedule at which the future payments will be charged. Defaults to `weekly`.
8785
+ attr_accessor :payment_schedule
8786
+ # Subscription name displayed to buyers in their bank app. Defaults to the displayable business name.
8787
+ attr_accessor :reference
8788
+ # Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date.
8789
+ attr_accessor :start_date
8790
+
8791
+ def initialize(
8792
+ amount: nil,
8793
+ amount_includes_iof: nil,
8794
+ amount_type: nil,
8795
+ currency: nil,
8796
+ end_date: nil,
8797
+ payment_schedule: nil,
8798
+ reference: nil,
8799
+ start_date: nil
8800
+ )
8801
+ @amount = amount
8802
+ @amount_includes_iof = amount_includes_iof
8803
+ @amount_type = amount_type
8804
+ @currency = currency
8805
+ @end_date = end_date
8806
+ @payment_schedule = payment_schedule
8807
+ @reference = reference
8808
+ @start_date = start_date
8809
+ end
8810
+ end
8811
+ # Determines if the amount includes the IOF tax. Defaults to `never`.
8812
+ attr_accessor :amount_includes_iof
8697
8813
  # The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds.
8698
8814
  attr_accessor :expires_after_seconds
8699
8815
  # The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future.
8700
8816
  attr_accessor :expires_at
8817
+ # Additional fields for mandate creation. Only applicable when `setup_future_usage=off_session`.
8818
+ attr_accessor :mandate_options
8701
8819
  # Indicates that you intend to make future payments with this PaymentIntent's payment method.
8702
8820
  #
8703
8821
  # 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.
@@ -8709,9 +8827,17 @@ module Stripe
8709
8827
  # 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`.
8710
8828
  attr_accessor :setup_future_usage
8711
8829
 
8712
- def initialize(expires_after_seconds: nil, expires_at: nil, setup_future_usage: nil)
8830
+ def initialize(
8831
+ amount_includes_iof: nil,
8832
+ expires_after_seconds: nil,
8833
+ expires_at: nil,
8834
+ mandate_options: nil,
8835
+ setup_future_usage: nil
8836
+ )
8837
+ @amount_includes_iof = amount_includes_iof
8713
8838
  @expires_after_seconds = expires_after_seconds
8714
8839
  @expires_at = expires_at
8840
+ @mandate_options = mandate_options
8715
8841
  @setup_future_usage = setup_future_usage
8716
8842
  end
8717
8843
  end
@@ -13374,10 +13500,52 @@ module Stripe
13374
13500
  end
13375
13501
 
13376
13502
  class Pix < Stripe::RequestParams
13503
+ class MandateOptions < Stripe::RequestParams
13504
+ # Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000.
13505
+ attr_accessor :amount
13506
+ # Determines if the amount includes the IOF tax. Defaults to `never`.
13507
+ attr_accessor :amount_includes_iof
13508
+ # Type of amount. Defaults to `maximum`.
13509
+ attr_accessor :amount_type
13510
+ # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently.
13511
+ attr_accessor :currency
13512
+ # Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
13513
+ attr_accessor :end_date
13514
+ # Schedule at which the future payments will be charged. Defaults to `weekly`.
13515
+ attr_accessor :payment_schedule
13516
+ # Subscription name displayed to buyers in their bank app. Defaults to the displayable business name.
13517
+ attr_accessor :reference
13518
+ # Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date.
13519
+ attr_accessor :start_date
13520
+
13521
+ def initialize(
13522
+ amount: nil,
13523
+ amount_includes_iof: nil,
13524
+ amount_type: nil,
13525
+ currency: nil,
13526
+ end_date: nil,
13527
+ payment_schedule: nil,
13528
+ reference: nil,
13529
+ start_date: nil
13530
+ )
13531
+ @amount = amount
13532
+ @amount_includes_iof = amount_includes_iof
13533
+ @amount_type = amount_type
13534
+ @currency = currency
13535
+ @end_date = end_date
13536
+ @payment_schedule = payment_schedule
13537
+ @reference = reference
13538
+ @start_date = start_date
13539
+ end
13540
+ end
13541
+ # Determines if the amount includes the IOF tax. Defaults to `never`.
13542
+ attr_accessor :amount_includes_iof
13377
13543
  # The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds.
13378
13544
  attr_accessor :expires_after_seconds
13379
13545
  # The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future.
13380
13546
  attr_accessor :expires_at
13547
+ # Additional fields for mandate creation. Only applicable when `setup_future_usage=off_session`.
13548
+ attr_accessor :mandate_options
13381
13549
  # Indicates that you intend to make future payments with this PaymentIntent's payment method.
13382
13550
  #
13383
13551
  # 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.
@@ -13389,9 +13557,17 @@ module Stripe
13389
13557
  # 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`.
13390
13558
  attr_accessor :setup_future_usage
13391
13559
 
13392
- def initialize(expires_after_seconds: nil, expires_at: nil, setup_future_usage: nil)
13560
+ def initialize(
13561
+ amount_includes_iof: nil,
13562
+ expires_after_seconds: nil,
13563
+ expires_at: nil,
13564
+ mandate_options: nil,
13565
+ setup_future_usage: nil
13566
+ )
13567
+ @amount_includes_iof = amount_includes_iof
13393
13568
  @expires_after_seconds = expires_after_seconds
13394
13569
  @expires_at = expires_at
13570
+ @mandate_options = mandate_options
13395
13571
  @setup_future_usage = setup_future_usage
13396
13572
  end
13397
13573
  end
@@ -14573,6 +14749,8 @@ module Stripe
14573
14749
  attr_reader :customer_account
14574
14750
  # An arbitrary string attached to the object. Often useful for displaying to users.
14575
14751
  attr_reader :description
14752
+ # The list of payment method types to exclude from use with this payment.
14753
+ attr_reader :excluded_payment_method_types
14576
14754
  # The FX Quote used for the PaymentIntent.
14577
14755
  attr_reader :fx_quote
14578
14756
  # Attribute for field hooks
@@ -726,7 +726,7 @@ module Stripe
726
726
  end
727
727
  # When set, provides configuration for this item’s quantity to be adjusted by the customer during checkout.
728
728
  attr_accessor :adjustable_quantity
729
- # The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object.
729
+ # The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object. One of `price` or `price_data` is required.
730
730
  attr_accessor :price
731
731
  # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
732
732
  attr_accessor :price_data
@@ -1640,6 +1640,8 @@ module Stripe
1640
1640
  attr_reader :konbini
1641
1641
  # Attribute for field kr_card
1642
1642
  attr_reader :kr_card
1643
+ # The Mandate object of the most recently created Mandate associated with this payment method
1644
+ attr_reader :latest_active_mandate
1643
1645
  # Attribute for field link
1644
1646
  attr_reader :link
1645
1647
  # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
@@ -12,31 +12,52 @@ module Stripe
12
12
  "payment_record"
13
13
  end
14
14
 
15
+ class Amount < Stripe::StripeObject
16
+ # 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).
17
+ attr_reader :currency
18
+ # A positive integer representing the amount in the currency's [minor unit](https://stripe.com/docs/currencies#zero-decimal). For example, `100` can represent 1 USD or 100 JPY.
19
+ attr_reader :value
20
+ end
21
+
22
+ class AmountAuthorized < Stripe::StripeObject
23
+ # 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).
24
+ attr_reader :currency
25
+ # A positive integer representing the amount in the currency's [minor unit](https://stripe.com/docs/currencies#zero-decimal). For example, `100` can represent 1 USD or 100 JPY.
26
+ attr_reader :value
27
+ end
28
+
15
29
  class AmountCanceled < Stripe::StripeObject
16
30
  # 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).
17
31
  attr_reader :currency
18
- # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) for example, 100 cents for 1 USD or 100 for 100 JPY, a zero-decimal currency.
32
+ # A positive integer representing the amount in the currency's [minor unit](https://stripe.com/docs/currencies#zero-decimal). For example, `100` can represent 1 USD or 100 JPY.
19
33
  attr_reader :value
20
34
  end
21
35
 
22
36
  class AmountFailed < Stripe::StripeObject
23
37
  # 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).
24
38
  attr_reader :currency
25
- # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) for example, 100 cents for 1 USD or 100 for 100 JPY, a zero-decimal currency.
39
+ # A positive integer representing the amount in the currency's [minor unit](https://stripe.com/docs/currencies#zero-decimal). For example, `100` can represent 1 USD or 100 JPY.
26
40
  attr_reader :value
27
41
  end
28
42
 
29
43
  class AmountGuaranteed < Stripe::StripeObject
30
44
  # 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).
31
45
  attr_reader :currency
32
- # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) for example, 100 cents for 1 USD or 100 for 100 JPY, a zero-decimal currency.
46
+ # A positive integer representing the amount in the currency's [minor unit](https://stripe.com/docs/currencies#zero-decimal). For example, `100` can represent 1 USD or 100 JPY.
47
+ attr_reader :value
48
+ end
49
+
50
+ class AmountRefunded < Stripe::StripeObject
51
+ # 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).
52
+ attr_reader :currency
53
+ # A positive integer representing the amount in the currency's [minor unit](https://stripe.com/docs/currencies#zero-decimal). For example, `100` can represent 1 USD or 100 JPY.
33
54
  attr_reader :value
34
55
  end
35
56
 
36
57
  class AmountRequested < Stripe::StripeObject
37
58
  # 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).
38
59
  attr_reader :currency
39
- # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) for example, 100 cents for 1 USD or 100 for 100 JPY, a zero-decimal currency.
60
+ # A positive integer representing the amount in the currency's [minor unit](https://stripe.com/docs/currencies#zero-decimal). For example, `100` can represent 1 USD or 100 JPY.
40
61
  attr_reader :value
41
62
  end
42
63
 
@@ -118,7 +139,16 @@ module Stripe
118
139
  attr_reader :transaction_id
119
140
  end
120
141
 
121
- class Alma < Stripe::StripeObject; end
142
+ class Alma < Stripe::StripeObject
143
+ class Installments < Stripe::StripeObject
144
+ # The number of installments.
145
+ attr_reader :count
146
+ end
147
+ # Attribute for field installments
148
+ attr_reader :installments
149
+ # The Alma transaction ID associated with this payment.
150
+ attr_reader :transaction_id
151
+ end
122
152
 
123
153
  class AmazonPay < Stripe::StripeObject
124
154
  class Funding < Stripe::StripeObject
@@ -145,6 +175,8 @@ module Stripe
145
175
  end
146
176
  # Attribute for field funding
147
177
  attr_reader :funding
178
+ # The Amazon Pay transaction ID associated with this payment.
179
+ attr_reader :transaction_id
148
180
  end
149
181
 
150
182
  class AuBecsDebit < Stripe::StripeObject
@@ -190,7 +222,10 @@ module Stripe
190
222
  attr_reader :verified_name
191
223
  end
192
224
 
193
- class Billie < Stripe::StripeObject; end
225
+ class Billie < Stripe::StripeObject
226
+ # The Billie transaction ID associated with this payment.
227
+ attr_reader :transaction_id
228
+ end
194
229
 
195
230
  class BillingDetails < Stripe::StripeObject
196
231
  class Address < Stripe::StripeObject
@@ -531,6 +566,8 @@ module Stripe
531
566
  class KakaoPay < Stripe::StripeObject
532
567
  # A unique identifier for the buyer as determined by the local payment processor.
533
568
  attr_reader :buyer_id
569
+ # The Kakao Pay transaction ID associated with this payment.
570
+ attr_reader :transaction_id
534
571
  end
535
572
 
536
573
  class Klarna < Stripe::StripeObject
@@ -568,6 +605,8 @@ module Stripe
568
605
  attr_reader :buyer_id
569
606
  # The last four digits of the card. This may not be present for American Express cards.
570
607
  attr_reader :last4
608
+ # The Korean Card transaction ID associated with this payment.
609
+ attr_reader :transaction_id
571
610
  end
572
611
 
573
612
  class Link < Stripe::StripeObject
@@ -605,6 +644,8 @@ module Stripe
605
644
  class NaverPay < Stripe::StripeObject
606
645
  # A unique identifier for the buyer as determined by the local payment processor.
607
646
  attr_reader :buyer_id
647
+ # The Naver Pay transaction ID associated with this payment.
648
+ attr_reader :transaction_id
608
649
  end
609
650
 
610
651
  class NzBankAccount < Stripe::StripeObject
@@ -643,9 +684,15 @@ module Stripe
643
684
  class Payco < Stripe::StripeObject
644
685
  # A unique identifier for the buyer as determined by the local payment processor.
645
686
  attr_reader :buyer_id
687
+ # The Payco transaction ID associated with this payment.
688
+ attr_reader :transaction_id
646
689
  end
647
690
 
648
691
  class Paynow < Stripe::StripeObject
692
+ # ID of the [location](https://stripe.com/docs/api/terminal/locations) that this transaction's reader is assigned to.
693
+ attr_reader :location
694
+ # ID of the [reader](https://stripe.com/docs/api/terminal/readers) this transaction was made on.
695
+ attr_reader :reader
649
696
  # Reference number associated with this PayNow payment
650
697
  attr_reader :reference
651
698
  end
@@ -731,6 +778,8 @@ module Stripe
731
778
  class Pix < Stripe::StripeObject
732
779
  # Unique transaction id generated by BCB
733
780
  attr_reader :bank_transaction_id
781
+ # ID of the multi use Mandate generated by the PaymentIntent
782
+ attr_reader :mandate
734
783
  end
735
784
 
736
785
  class Promptpay < Stripe::StripeObject
@@ -766,14 +815,21 @@ module Stripe
766
815
  end
767
816
  # Attribute for field funding
768
817
  attr_reader :funding
818
+ # The Revolut Pay transaction ID associated with this payment.
819
+ attr_reader :transaction_id
769
820
  end
770
821
 
771
822
  class SamsungPay < Stripe::StripeObject
772
823
  # A unique identifier for the buyer as determined by the local payment processor.
773
824
  attr_reader :buyer_id
825
+ # The Samsung Pay transaction ID associated with this payment.
826
+ attr_reader :transaction_id
774
827
  end
775
828
 
776
- class Satispay < Stripe::StripeObject; end
829
+ class Satispay < Stripe::StripeObject
830
+ # The Satispay transaction ID associated with this payment.
831
+ attr_reader :transaction_id
832
+ end
777
833
 
778
834
  class SepaCreditTransfer < Stripe::StripeObject
779
835
  # Name of the bank associated with the bank account.
@@ -1017,6 +1073,19 @@ module Stripe
1017
1073
  attr_reader :zip
1018
1074
  end
1019
1075
 
1076
+ class ProcessorDetails < Stripe::StripeObject
1077
+ class Custom < Stripe::StripeObject
1078
+ # An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID.
1079
+ attr_reader :payment_reference
1080
+ end
1081
+ # Custom processors represent payment processors not modeled directly in
1082
+ # the Stripe API. This resource consists of details about the custom processor
1083
+ # used for this payment attempt.
1084
+ attr_reader :custom
1085
+ # The processor used for this payment attempt.
1086
+ attr_reader :type
1087
+ end
1088
+
1020
1089
  class ShippingDetails < Stripe::StripeObject
1021
1090
  class Address < Stripe::StripeObject
1022
1091
  # City, district, suburb, town, or village.
@@ -1271,7 +1340,7 @@ module Stripe
1271
1340
  class AmountRequested < Stripe::RequestParams
1272
1341
  # 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).
1273
1342
  attr_accessor :currency
1274
- # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) for example, 100 cents for 1 USD or 100 for 100 JPY, a zero-decimal currency.
1343
+ # A positive integer representing the amount in the currency's [minor unit](https://stripe.com/docs/currencies#zero-decimal). For example, `100` can represent 1 USD or 100 JPY.
1275
1344
  attr_accessor :value
1276
1345
 
1277
1346
  def initialize(currency: nil, value: nil)
@@ -1393,6 +1462,26 @@ module Stripe
1393
1462
  end
1394
1463
  end
1395
1464
 
1465
+ class ProcessorDetails < Stripe::RequestParams
1466
+ class Custom < Stripe::RequestParams
1467
+ # An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID.
1468
+ attr_accessor :payment_reference
1469
+
1470
+ def initialize(payment_reference: nil)
1471
+ @payment_reference = payment_reference
1472
+ end
1473
+ end
1474
+ # Information about the custom processor used to make this payment.
1475
+ attr_accessor :custom
1476
+ # 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.
1477
+ attr_accessor :type
1478
+
1479
+ def initialize(custom: nil, type: nil)
1480
+ @custom = custom
1481
+ @type = type
1482
+ end
1483
+ end
1484
+
1396
1485
  class ShippingDetails < Stripe::RequestParams
1397
1486
  class Address < Stripe::RequestParams
1398
1487
  # City, district, suburb, town, or village.
@@ -1459,8 +1548,8 @@ module Stripe
1459
1548
  attr_accessor :outcome
1460
1549
  # Information about the Payment Method debited for this payment.
1461
1550
  attr_accessor :payment_method_details
1462
- # An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID.
1463
- attr_accessor :payment_reference
1551
+ # Processor information for this payment.
1552
+ attr_accessor :processor_details
1464
1553
  # Shipping information for this payment.
1465
1554
  attr_accessor :shipping_details
1466
1555
 
@@ -1476,7 +1565,7 @@ module Stripe
1476
1565
  metadata: nil,
1477
1566
  outcome: nil,
1478
1567
  payment_method_details: nil,
1479
- payment_reference: nil,
1568
+ processor_details: nil,
1480
1569
  shipping_details: nil
1481
1570
  )
1482
1571
  @amount_requested = amount_requested
@@ -1490,18 +1579,26 @@ module Stripe
1490
1579
  @metadata = metadata
1491
1580
  @outcome = outcome
1492
1581
  @payment_method_details = payment_method_details
1493
- @payment_reference = payment_reference
1582
+ @processor_details = processor_details
1494
1583
  @shipping_details = shipping_details
1495
1584
  end
1496
1585
  end
1497
1586
  # A representation of an amount of money, consisting of an amount and a currency.
1587
+ attr_reader :amount
1588
+ # A representation of an amount of money, consisting of an amount and a currency.
1589
+ attr_reader :amount_authorized
1590
+ # A representation of an amount of money, consisting of an amount and a currency.
1498
1591
  attr_reader :amount_canceled
1499
1592
  # A representation of an amount of money, consisting of an amount and a currency.
1500
1593
  attr_reader :amount_failed
1501
1594
  # A representation of an amount of money, consisting of an amount and a currency.
1502
1595
  attr_reader :amount_guaranteed
1503
1596
  # A representation of an amount of money, consisting of an amount and a currency.
1597
+ attr_reader :amount_refunded
1598
+ # A representation of an amount of money, consisting of an amount and a currency.
1504
1599
  attr_reader :amount_requested
1600
+ # ID of the Connect application that created the PaymentRecord.
1601
+ attr_reader :application
1505
1602
  # Time at which the object was created. Measured in seconds since the Unix epoch.
1506
1603
  attr_reader :created
1507
1604
  # Customer information for this payment.
@@ -1522,8 +1619,8 @@ module Stripe
1522
1619
  attr_reader :object
1523
1620
  # Information about the Payment Method debited for this payment.
1524
1621
  attr_reader :payment_method_details
1525
- # An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID.
1526
- attr_reader :payment_reference
1622
+ # Processor information associated with this payment.
1623
+ attr_reader :processor_details
1527
1624
  # Shipping information for this payment.
1528
1625
  attr_reader :shipping_details
1529
1626
 
@@ -2,8 +2,11 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
- # A Promotion Code represents a customer-redeemable code for a [coupon](https://stripe.com/docs/api#coupons). It can be used to
6
- # create multiple codes for a single coupon.
5
+ # A Promotion Code represents a customer-redeemable code for a [coupon](https://stripe.com/docs/api#coupons).
6
+ # You can create multiple codes for a single coupon.
7
+ #
8
+ # If you enable promotion codes in your [customer portal configuration](https://stripe.com/docs/customer-management/configure-portal), then customers can redeem a code themselves when updating a subscription in the portal.
9
+ # Customers can also view the currently active promotion codes and coupons on each of their subscriptions in the portal.
7
10
  class PromotionCode < APIResource
8
11
  extend Stripe::APIOperations::Create
9
12
  extend Stripe::APIOperations::List
@@ -179,7 +179,7 @@ module Stripe
179
179
  attr_reader :message
180
180
  # 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.
181
181
  attr_reader :network_advice_code
182
- # For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed.
182
+ # For payments declined by the network, an alphanumeric code which indicates the reason the payment failed.
183
183
  attr_reader :network_decline_code
184
184
  # 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.
185
185
  attr_reader :param
@@ -130,8 +130,32 @@ module Stripe
130
130
  # ID of the promotion code to create a new discount for.
131
131
  attr_reader :promotion_code
132
132
  end
133
+
134
+ class Period < Stripe::StripeObject
135
+ class End < Stripe::StripeObject
136
+ # A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`.
137
+ attr_reader :timestamp
138
+ # Select how to calculate the end of the invoice item period.
139
+ attr_reader :type
140
+ end
141
+
142
+ class Start < Stripe::StripeObject
143
+ # A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`.
144
+ attr_reader :timestamp
145
+ # Select how to calculate the start of the invoice item period.
146
+ attr_reader :type
147
+ end
148
+ # Attribute for field end
149
+ attr_reader :end
150
+ # Attribute for field start
151
+ attr_reader :start
152
+ end
133
153
  # The stackable discounts that will be applied to the item.
134
154
  attr_reader :discounts
155
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
156
+ attr_reader :metadata
157
+ # Attribute for field period
158
+ attr_reader :period
135
159
  # ID of the price used to generate the invoice item.
136
160
  attr_reader :price
137
161
  # The quantity of the invoice item.