stripe 19.2.0.pre.alpha.2 → 19.2.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 (44) hide show
  1. checksums.yaml +4 -4
  2. data/lib/stripe/events/unknown_event_notification.rb +1 -0
  3. data/lib/stripe/object_types.rb +1 -0
  4. data/lib/stripe/params/account_create_params.rb +20 -1
  5. data/lib/stripe/params/account_update_params.rb +20 -1
  6. data/lib/stripe/params/confirmation_token_create_params.rb +13 -0
  7. data/lib/stripe/params/delegated_checkout/requested_session_confirm_params.rb +4 -0
  8. data/lib/stripe/params/payment_intent_confirm_params.rb +13 -0
  9. data/lib/stripe/params/payment_intent_create_params.rb +13 -0
  10. data/lib/stripe/params/payment_intent_update_params.rb +13 -0
  11. data/lib/stripe/params/payment_location_create_params.rb +54 -0
  12. data/lib/stripe/params/payment_location_delete_params.rb +6 -0
  13. data/lib/stripe/params/payment_location_retrieve_params.rb +13 -0
  14. data/lib/stripe/params/payment_location_update_params.rb +54 -0
  15. data/lib/stripe/params/payment_method_create_params.rb +13 -0
  16. data/lib/stripe/params/setup_intent_confirm_params.rb +13 -0
  17. data/lib/stripe/params/setup_intent_create_params.rb +13 -0
  18. data/lib/stripe/params/setup_intent_update_params.rb +13 -0
  19. data/lib/stripe/params/test_helpers/confirmation_token_create_params.rb +13 -0
  20. data/lib/stripe/params/v2/core/account_create_params.rb +76 -2
  21. data/lib/stripe/params/v2/core/account_update_params.rb +76 -2
  22. data/lib/stripe/params.rb +4 -0
  23. data/lib/stripe/resources/capability.rb +36 -1
  24. data/lib/stripe/resources/confirmation_token.rb +26 -0
  25. data/lib/stripe/resources/invoice_item.rb +34 -1
  26. data/lib/stripe/resources/issuing/dispute.rb +68 -0
  27. data/lib/stripe/resources/payment_location.rb +159 -0
  28. data/lib/stripe/resources/payment_method.rb +26 -0
  29. data/lib/stripe/resources/shared_payment/granted_token.rb +26 -0
  30. data/lib/stripe/resources/subscription.rb +44 -0
  31. data/lib/stripe/resources/v2/core/account.rb +116 -2
  32. data/lib/stripe/resources/v2/core/event_notification.rb +1 -0
  33. data/lib/stripe/resources.rb +1 -0
  34. data/lib/stripe/services/payment_location_service.rb +50 -0
  35. data/lib/stripe/services/v1_services.rb +2 -1
  36. data/lib/stripe/services.rb +1 -0
  37. data/lib/stripe/stripe_client.rb +8 -1
  38. data/lib/stripe/stripe_event_notification_handler.rb +2478 -0
  39. data/lib/stripe/version.rb +1 -1
  40. data/lib/stripe.rb +1 -0
  41. data/rbi/stripe/resources/v2/core/event_notification.rbi +3 -0
  42. data/rbi/stripe/stripe_client.rbi +13 -0
  43. data/rbi/stripe.rbi +1291 -86
  44. metadata +9 -2
@@ -203,6 +203,15 @@ module Stripe
203
203
  end
204
204
 
205
205
  class Lead < ::Stripe::RequestParams
206
+ class DebitCard < ::Stripe::RequestParams
207
+ # To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
208
+ attr_accessor :requested
209
+
210
+ def initialize(requested: nil)
211
+ @requested = requested
212
+ end
213
+ end
214
+
206
215
  class PrepaidCard < ::Stripe::RequestParams
207
216
  # To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
208
217
  attr_accessor :requested
@@ -211,10 +220,13 @@ module Stripe
211
220
  @requested = requested
212
221
  end
213
222
  end
223
+ # Can create consumer issuing debit cards with Lead as BIN sponsor.
224
+ attr_accessor :debit_card
214
225
  # Can create consumer issuing prepaid cards with Lead as BIN sponsor.
215
226
  attr_accessor :prepaid_card
216
227
 
217
- def initialize(prepaid_card: nil)
228
+ def initialize(debit_card: nil, prepaid_card: nil)
229
+ @debit_card = debit_card
218
230
  @prepaid_card = prepaid_card
219
231
  end
220
232
  end
@@ -2557,6 +2569,65 @@ module Stripe
2557
2569
  end
2558
2570
 
2559
2571
  class Lead < ::Stripe::RequestParams
2572
+ class DebitCard < ::Stripe::RequestParams
2573
+ class BankTerms < ::Stripe::RequestParams
2574
+ # The time when the Account's representative accepted the terms of service. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z.
2575
+ attr_accessor :date
2576
+ # The IP address from which the Account's representative accepted the terms of service.
2577
+ attr_accessor :ip
2578
+ # The user agent of the browser from which the Account's representative accepted the terms of service.
2579
+ attr_accessor :user_agent
2580
+
2581
+ def initialize(date: nil, ip: nil, user_agent: nil)
2582
+ @date = date
2583
+ @ip = ip
2584
+ @user_agent = user_agent
2585
+ end
2586
+ end
2587
+
2588
+ class FinancingDisclosures < ::Stripe::RequestParams
2589
+ # The time when the Account's representative accepted the terms of service. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z.
2590
+ attr_accessor :date
2591
+ # The IP address from which the Account's representative accepted the terms of service.
2592
+ attr_accessor :ip
2593
+ # The user agent of the browser from which the Account's representative accepted the terms of service.
2594
+ attr_accessor :user_agent
2595
+
2596
+ def initialize(date: nil, ip: nil, user_agent: nil)
2597
+ @date = date
2598
+ @ip = ip
2599
+ @user_agent = user_agent
2600
+ end
2601
+ end
2602
+
2603
+ class Platform < ::Stripe::RequestParams
2604
+ # The time when the Account's representative accepted the terms of service. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z.
2605
+ attr_accessor :date
2606
+ # The IP address from which the Account's representative accepted the terms of service.
2607
+ attr_accessor :ip
2608
+ # The user agent of the browser from which the Account's representative accepted the terms of service.
2609
+ attr_accessor :user_agent
2610
+
2611
+ def initialize(date: nil, ip: nil, user_agent: nil)
2612
+ @date = date
2613
+ @ip = ip
2614
+ @user_agent = user_agent
2615
+ end
2616
+ end
2617
+ # Bank terms of service acceptance for consumer issuing debit cards with Lead as BIN sponsor.
2618
+ attr_accessor :bank_terms
2619
+ # Financial disclosures terms of service acceptance for consumer issuing debit cards with Lead as BIN sponsor.
2620
+ attr_accessor :financing_disclosures
2621
+ # Platform terms of service acceptance for consumer issuing debit cards with Lead as BIN sponsor.
2622
+ attr_accessor :platform
2623
+
2624
+ def initialize(bank_terms: nil, financing_disclosures: nil, platform: nil)
2625
+ @bank_terms = bank_terms
2626
+ @financing_disclosures = financing_disclosures
2627
+ @platform = platform
2628
+ end
2629
+ end
2630
+
2560
2631
  class PrepaidCard < ::Stripe::RequestParams
2561
2632
  class BankTerms < ::Stripe::RequestParams
2562
2633
  # The time when the Account's representative accepted the terms of service. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z.
@@ -2615,10 +2686,13 @@ module Stripe
2615
2686
  @platform = platform
2616
2687
  end
2617
2688
  end
2689
+ # Terms of service acceptances for consumer issuing debit cards with Lead as BIN sponsor.
2690
+ attr_accessor :debit_card
2618
2691
  # Terms of service acceptances for consumer issuing prepaid cards with Lead as BIN sponsor.
2619
2692
  attr_accessor :prepaid_card
2620
2693
 
2621
- def initialize(prepaid_card: nil)
2694
+ def initialize(debit_card: nil, prepaid_card: nil)
2695
+ @debit_card = debit_card
2622
2696
  @prepaid_card = prepaid_card
2623
2697
  end
2624
2698
  end
@@ -203,6 +203,15 @@ module Stripe
203
203
  end
204
204
 
205
205
  class Lead < ::Stripe::RequestParams
206
+ class DebitCard < ::Stripe::RequestParams
207
+ # To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
208
+ attr_accessor :requested
209
+
210
+ def initialize(requested: nil)
211
+ @requested = requested
212
+ end
213
+ end
214
+
206
215
  class PrepaidCard < ::Stripe::RequestParams
207
216
  # To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
208
217
  attr_accessor :requested
@@ -211,10 +220,13 @@ module Stripe
211
220
  @requested = requested
212
221
  end
213
222
  end
223
+ # Can create consumer issuing debit cards with Lead as BIN sponsor.
224
+ attr_accessor :debit_card
214
225
  # Can create consumer issuing prepaid cards with Lead as BIN sponsor.
215
226
  attr_accessor :prepaid_card
216
227
 
217
- def initialize(prepaid_card: nil)
228
+ def initialize(debit_card: nil, prepaid_card: nil)
229
+ @debit_card = debit_card
218
230
  @prepaid_card = prepaid_card
219
231
  end
220
232
  end
@@ -2586,6 +2598,65 @@ module Stripe
2586
2598
  end
2587
2599
  end
2588
2600
 
2601
+ class DebitCard < ::Stripe::RequestParams
2602
+ class BankTerms < ::Stripe::RequestParams
2603
+ # The time when the Account's representative accepted the terms of service. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z.
2604
+ attr_accessor :date
2605
+ # The IP address from which the Account's representative accepted the terms of service.
2606
+ attr_accessor :ip
2607
+ # The user agent of the browser from which the Account's representative accepted the terms of service.
2608
+ attr_accessor :user_agent
2609
+
2610
+ def initialize(date: nil, ip: nil, user_agent: nil)
2611
+ @date = date
2612
+ @ip = ip
2613
+ @user_agent = user_agent
2614
+ end
2615
+ end
2616
+
2617
+ class FinancingDisclosures < ::Stripe::RequestParams
2618
+ # The time when the Account's representative accepted the terms of service. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z.
2619
+ attr_accessor :date
2620
+ # The IP address from which the Account's representative accepted the terms of service.
2621
+ attr_accessor :ip
2622
+ # The user agent of the browser from which the Account's representative accepted the terms of service.
2623
+ attr_accessor :user_agent
2624
+
2625
+ def initialize(date: nil, ip: nil, user_agent: nil)
2626
+ @date = date
2627
+ @ip = ip
2628
+ @user_agent = user_agent
2629
+ end
2630
+ end
2631
+
2632
+ class Platform < ::Stripe::RequestParams
2633
+ # The time when the Account's representative accepted the terms of service. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z.
2634
+ attr_accessor :date
2635
+ # The IP address from which the Account's representative accepted the terms of service.
2636
+ attr_accessor :ip
2637
+ # The user agent of the browser from which the Account's representative accepted the terms of service.
2638
+ attr_accessor :user_agent
2639
+
2640
+ def initialize(date: nil, ip: nil, user_agent: nil)
2641
+ @date = date
2642
+ @ip = ip
2643
+ @user_agent = user_agent
2644
+ end
2645
+ end
2646
+ # Bank terms of service acceptance for consumer issuing debit cards with Lead as BIN sponsor.
2647
+ attr_accessor :bank_terms
2648
+ # Financial disclosures terms of service acceptance for consumer issuing debit cards with Lead as BIN sponsor.
2649
+ attr_accessor :financing_disclosures
2650
+ # Platform terms of service acceptance for consumer issuing debit cards with Lead as BIN sponsor.
2651
+ attr_accessor :platform
2652
+
2653
+ def initialize(bank_terms: nil, financing_disclosures: nil, platform: nil)
2654
+ @bank_terms = bank_terms
2655
+ @financing_disclosures = financing_disclosures
2656
+ @platform = platform
2657
+ end
2658
+ end
2659
+
2589
2660
  class PrepaidCard < ::Stripe::RequestParams
2590
2661
  class BankTerms < ::Stripe::RequestParams
2591
2662
  # The time when the Account's representative accepted the terms of service. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z.
@@ -2646,11 +2717,14 @@ module Stripe
2646
2717
  end
2647
2718
  # Terms of service acceptances for consumer issuing Apple Pay cards with Lead as BIN sponsor.
2648
2719
  attr_accessor :apple_pay
2720
+ # Terms of service acceptances for consumer issuing debit cards with Lead as BIN sponsor.
2721
+ attr_accessor :debit_card
2649
2722
  # Terms of service acceptances for consumer issuing prepaid cards with Lead as BIN sponsor.
2650
2723
  attr_accessor :prepaid_card
2651
2724
 
2652
- def initialize(apple_pay: nil, prepaid_card: nil)
2725
+ def initialize(apple_pay: nil, debit_card: nil, prepaid_card: nil)
2653
2726
  @apple_pay = apple_pay
2727
+ @debit_card = debit_card
2654
2728
  @prepaid_card = prepaid_card
2655
2729
  end
2656
2730
  end
data/lib/stripe/params.rb CHANGED
@@ -368,6 +368,10 @@ require "stripe/params/payment_link_list_line_items_params"
368
368
  require "stripe/params/payment_link_list_params"
369
369
  require "stripe/params/payment_link_retrieve_params"
370
370
  require "stripe/params/payment_link_update_params"
371
+ require "stripe/params/payment_location_create_params"
372
+ require "stripe/params/payment_location_delete_params"
373
+ require "stripe/params/payment_location_retrieve_params"
374
+ require "stripe/params/payment_location_update_params"
371
375
  require "stripe/params/payment_method_attach_params"
372
376
  require "stripe/params/payment_method_check_balance_params"
373
377
  require "stripe/params/payment_method_configuration_create_params"
@@ -71,6 +71,35 @@ module Stripe
71
71
  end
72
72
  end
73
73
 
74
+ class Protections < ::Stripe::StripeObject
75
+ class PspMigration < ::Stripe::StripeObject
76
+ # Time at which the protection expires. Measured in seconds since the Unix epoch.
77
+ attr_reader :expires_at
78
+ # Time at which the protection was requested. Measured in seconds since the Unix epoch.
79
+ attr_reader :requested_at
80
+ # The status of the capability protection.
81
+ attr_reader :status
82
+
83
+ def self.inner_class_types
84
+ @inner_class_types = {}
85
+ end
86
+
87
+ def self.field_remappings
88
+ @field_remappings = {}
89
+ end
90
+ end
91
+ # Attribute for field psp_migration
92
+ attr_reader :psp_migration
93
+
94
+ def self.inner_class_types
95
+ @inner_class_types = { psp_migration: PspMigration }
96
+ end
97
+
98
+ def self.field_remappings
99
+ @field_remappings = {}
100
+ end
101
+ end
102
+
74
103
  class Requirements < ::Stripe::StripeObject
75
104
  class Alternative < ::Stripe::StripeObject
76
105
  # Fields that can be provided to resolve all fields in `original_fields_due`.
@@ -136,6 +165,8 @@ module Stripe
136
165
  attr_reader :id
137
166
  # String representing the object's type. Objects of the same type share the same value.
138
167
  attr_reader :object
168
+ # Attribute for field protections
169
+ attr_reader :protections
139
170
  # Whether the capability has been requested.
140
171
  attr_reader :requested
141
172
  # Time at which the capability was requested. Measured in seconds since the Unix epoch.
@@ -169,7 +200,11 @@ module Stripe
169
200
  end
170
201
 
171
202
  def self.inner_class_types
172
- @inner_class_types = { future_requirements: FutureRequirements, requirements: Requirements }
203
+ @inner_class_types = {
204
+ future_requirements: FutureRequirements,
205
+ protections: Protections,
206
+ requirements: Requirements,
207
+ }
173
208
  end
174
209
 
175
210
  def self.field_remappings
@@ -968,6 +968,29 @@ module Stripe
968
968
  end
969
969
  end
970
970
 
971
+ class GiftCard < ::Stripe::StripeObject
972
+ # The brand of the gift card.
973
+ attr_reader :brand
974
+ # The expiration month of the gift card.
975
+ attr_reader :exp_month
976
+ # The expiration year of the gift card.
977
+ attr_reader :exp_year
978
+ # Uniquely identifies the gift card.
979
+ attr_reader :fingerprint
980
+ # The first six digits of the gift card number.
981
+ attr_reader :first6
982
+ # The last four digits of the gift card number.
983
+ attr_reader :last4
984
+
985
+ def self.inner_class_types
986
+ @inner_class_types = {}
987
+ end
988
+
989
+ def self.field_remappings
990
+ @field_remappings = {}
991
+ end
992
+ end
993
+
971
994
  class Giropay < ::Stripe::StripeObject
972
995
  def self.inner_class_types
973
996
  @inner_class_types = {}
@@ -1681,6 +1704,8 @@ module Stripe
1681
1704
  attr_reader :eps
1682
1705
  # Attribute for field fpx
1683
1706
  attr_reader :fpx
1707
+ # Attribute for field gift_card
1708
+ attr_reader :gift_card
1684
1709
  # Attribute for field giropay
1685
1710
  attr_reader :giropay
1686
1711
  # Attribute for field gopay
@@ -1790,6 +1815,7 @@ module Stripe
1790
1815
  customer_balance: CustomerBalance,
1791
1816
  eps: Eps,
1792
1817
  fpx: Fpx,
1818
+ gift_card: GiftCard,
1793
1819
  giropay: Giropay,
1794
1820
  gopay: Gopay,
1795
1821
  grabpay: Grabpay,
@@ -221,6 +221,37 @@ module Stripe
221
221
  end
222
222
 
223
223
  class ProrationDetails < ::Stripe::StripeObject
224
+ class CreditedItems < ::Stripe::StripeObject
225
+ class InvoiceLineItems < ::Stripe::StripeObject
226
+ # The invoice id for the debited line item(s).
227
+ attr_reader :invoice
228
+ # IDs of the debited invoice line item(s) on the invoice that correspond to the credit proration.
229
+ attr_reader :invoice_line_items
230
+
231
+ def self.inner_class_types
232
+ @inner_class_types = {}
233
+ end
234
+
235
+ def self.field_remappings
236
+ @field_remappings = {}
237
+ end
238
+ end
239
+ # When `type` is `invoice_item`, the invoice item id for the debited invoice item corresponding to this credit proration.
240
+ attr_reader :invoice_item
241
+ # Attribute for field invoice_line_items
242
+ attr_reader :invoice_line_items
243
+ # Whether the credit references a pending invoice item or one or more invoice line items on an invoice.
244
+ attr_reader :type
245
+
246
+ def self.inner_class_types
247
+ @inner_class_types = { invoice_line_items: InvoiceLineItems }
248
+ end
249
+
250
+ def self.field_remappings
251
+ @field_remappings = {}
252
+ end
253
+ end
254
+
224
255
  class DiscountAmount < ::Stripe::StripeObject
225
256
  # The amount, in cents (or local equivalent), of the discount.
226
257
  attr_reader :amount
@@ -235,11 +266,13 @@ module Stripe
235
266
  @field_remappings = {}
236
267
  end
237
268
  end
269
+ # Attribute for field credited_items
270
+ attr_reader :credited_items
238
271
  # Discount amounts applied when the proration was created.
239
272
  attr_reader :discount_amounts
240
273
 
241
274
  def self.inner_class_types
242
- @inner_class_types = { discount_amounts: DiscountAmount }
275
+ @inner_class_types = { credited_items: CreditedItems, discount_amounts: DiscountAmount }
243
276
  end
244
277
 
245
278
  def self.field_remappings
@@ -336,6 +336,71 @@ module Stripe
336
336
  end
337
337
  end
338
338
 
339
+ class NetworkLifecycle < ::Stripe::StripeObject
340
+ class DisputeResponse < ::Stripe::StripeObject
341
+ # Error message if processing the acquiring merchant's initial dispute response failed.
342
+ attr_reader :error
343
+ # Array of [File](https://docs.stripe.com/api/files) ids containing evidence the acquiring merchant provided in support of their initial dispute response.
344
+ attr_reader :merchant_evidence_files
345
+
346
+ def self.inner_class_types
347
+ @inner_class_types = {}
348
+ end
349
+
350
+ def self.field_remappings
351
+ @field_remappings = {}
352
+ end
353
+ end
354
+
355
+ class PreArbitrationResponse < ::Stripe::StripeObject
356
+ # Error message if processing the acquiring merchant's pre-arbitration response failed.
357
+ attr_reader :error
358
+ # Array of [File](https://docs.stripe.com/api/files) ids containing evidence the acquiring merchant provided with their pre-arbitration response.
359
+ attr_reader :merchant_evidence_files
360
+
361
+ def self.inner_class_types
362
+ @inner_class_types = {}
363
+ end
364
+
365
+ def self.field_remappings
366
+ @field_remappings = {}
367
+ end
368
+ end
369
+
370
+ class PreArbitrationSubmission < ::Stripe::StripeObject
371
+ # Error message if processing the acquiring merchant's pre-arbitration submission failed.
372
+ attr_reader :error
373
+ # Array of [File](https://docs.stripe.com/api/files) ids containing evidence the acquiring merchant provided with their pre-arbitration submission.
374
+ attr_reader :merchant_evidence_files
375
+
376
+ def self.inner_class_types
377
+ @inner_class_types = {}
378
+ end
379
+
380
+ def self.field_remappings
381
+ @field_remappings = {}
382
+ end
383
+ end
384
+ # Information related to the acquiring merchant's initial response to this dispute.
385
+ attr_reader :dispute_response
386
+ # Information related to the acquiring merchant's pre-arbitration response for this dispute.
387
+ attr_reader :pre_arbitration_response
388
+ # Information related to the acquiring merchant's pre-arbitration submission for this dispute.
389
+ attr_reader :pre_arbitration_submission
390
+
391
+ def self.inner_class_types
392
+ @inner_class_types = {
393
+ dispute_response: DisputeResponse,
394
+ pre_arbitration_response: PreArbitrationResponse,
395
+ pre_arbitration_submission: PreArbitrationSubmission,
396
+ }
397
+ end
398
+
399
+ def self.field_remappings
400
+ @field_remappings = {}
401
+ end
402
+ end
403
+
339
404
  class Treasury < ::Stripe::StripeObject
340
405
  # The Treasury [DebitReversal](https://docs.stripe.com/api/treasury/debit_reversals) representing this Issuing dispute
341
406
  attr_reader :debit_reversal
@@ -370,6 +435,8 @@ module Stripe
370
435
  attr_reader :loss_reason
371
436
  # 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.
372
437
  attr_reader :metadata
438
+ # Incoming information from the card network for this dispute. Includes the acquiring merchant's initial response, pre-arbitration submission, and pre-arbitration response to the dispute.
439
+ attr_reader :network_lifecycle
373
440
  # String representing the object's type. Objects of the same type share the same value.
374
441
  attr_reader :object
375
442
  # Current status of the dispute.
@@ -433,6 +500,7 @@ module Stripe
433
500
  @inner_class_types = {
434
501
  crypto_transactions: CryptoTransaction,
435
502
  evidence: Evidence,
503
+ network_lifecycle: NetworkLifecycle,
436
504
  treasury: Treasury,
437
505
  }
438
506
  end
@@ -0,0 +1,159 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ # A Payment Location represents a physical location where payments take place.
6
+ class PaymentLocation < APIResource
7
+ extend Stripe::APIOperations::Create
8
+ include Stripe::APIOperations::Delete
9
+ include Stripe::APIOperations::Save
10
+
11
+ OBJECT_NAME = "payment_location"
12
+ def self.object_name
13
+ "payment_location"
14
+ end
15
+
16
+ class Address < ::Stripe::StripeObject
17
+ # City, district, suburb, town, or village.
18
+ attr_reader :city
19
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
20
+ attr_reader :country
21
+ # Address line 1, such as the street, PO Box, or company name.
22
+ attr_reader :line1
23
+ # Address line 2, such as the apartment, suite, unit, or building.
24
+ attr_reader :line2
25
+ # ZIP or postal code.
26
+ attr_reader :postal_code
27
+ # State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
28
+ attr_reader :state
29
+
30
+ def self.inner_class_types
31
+ @inner_class_types = {}
32
+ end
33
+
34
+ def self.field_remappings
35
+ @field_remappings = {}
36
+ end
37
+ end
38
+
39
+ class BusinessRegistration < ::Stripe::StripeObject
40
+ # 14-digit SIRET (Système d'identification du répertoire des établissements) number for the location.
41
+ attr_reader :siret
42
+
43
+ def self.inner_class_types
44
+ @inner_class_types = {}
45
+ end
46
+
47
+ def self.field_remappings
48
+ @field_remappings = {}
49
+ end
50
+ end
51
+
52
+ class CapabilitySettings < ::Stripe::StripeObject
53
+ class FrMealVouchersConecsPayments < ::Stripe::StripeObject
54
+ class SupportedIssuers < ::Stripe::StripeObject
55
+ # Supported meal voucher issuers for card payments.
56
+ attr_reader :card
57
+ # Supported meal voucher issuers for card present payments.
58
+ attr_reader :card_present
59
+
60
+ def self.inner_class_types
61
+ @inner_class_types = {}
62
+ end
63
+
64
+ def self.field_remappings
65
+ @field_remappings = {}
66
+ end
67
+ end
68
+ # Supported meal voucher issuers.
69
+ attr_reader :supported_issuers
70
+
71
+ def self.inner_class_types
72
+ @inner_class_types = { supported_issuers: SupportedIssuers }
73
+ end
74
+
75
+ def self.field_remappings
76
+ @field_remappings = {}
77
+ end
78
+ end
79
+ # Settings for Conecs French meal voucher capability.
80
+ attr_reader :fr_meal_vouchers_conecs_payments
81
+
82
+ def self.inner_class_types
83
+ @inner_class_types = { fr_meal_vouchers_conecs_payments: FrMealVouchersConecsPayments }
84
+ end
85
+
86
+ def self.field_remappings
87
+ @field_remappings = {}
88
+ end
89
+ end
90
+ # Attribute for field address
91
+ attr_reader :address
92
+ # Identification numbers associated with the location.
93
+ attr_reader :business_registration
94
+ # The capability settings for the location. Only applicable for locations with requested Payment Location Capabilities.
95
+ attr_reader :capability_settings
96
+ # Always true for a deleted object
97
+ attr_reader :deleted
98
+ # The display name of the location.
99
+ attr_reader :display_name
100
+ # Unique identifier for the object.
101
+ attr_reader :id
102
+ # If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
103
+ attr_reader :livemode
104
+ # String representing the object's type. Objects of the same type share the same value.
105
+ attr_reader :object
106
+
107
+ # Create a Payment Location.
108
+ def self.create(params = {}, opts = {})
109
+ request_stripe_object(
110
+ method: :post,
111
+ path: "/v1/payment_locations",
112
+ params: params,
113
+ opts: opts
114
+ )
115
+ end
116
+
117
+ # Delete a Payment Location.
118
+ def self.delete(id, params = {}, opts = {})
119
+ request_stripe_object(
120
+ method: :delete,
121
+ path: format("/v1/payment_locations/%<id>s", { id: CGI.escape(id) }),
122
+ params: params,
123
+ opts: opts
124
+ )
125
+ end
126
+
127
+ # Delete a Payment Location.
128
+ def delete(params = {}, opts = {})
129
+ request_stripe_object(
130
+ method: :delete,
131
+ path: format("/v1/payment_locations/%<id>s", { id: CGI.escape(self["id"]) }),
132
+ params: params,
133
+ opts: opts
134
+ )
135
+ end
136
+
137
+ # Update a Payment Location.
138
+ def self.update(id, params = {}, opts = {})
139
+ request_stripe_object(
140
+ method: :post,
141
+ path: format("/v1/payment_locations/%<id>s", { id: CGI.escape(id) }),
142
+ params: params,
143
+ opts: opts
144
+ )
145
+ end
146
+
147
+ def self.inner_class_types
148
+ @inner_class_types = {
149
+ address: Address,
150
+ business_registration: BusinessRegistration,
151
+ capability_settings: CapabilitySettings,
152
+ }
153
+ end
154
+
155
+ def self.field_remappings
156
+ @field_remappings = {}
157
+ end
158
+ end
159
+ end
@@ -907,6 +907,29 @@ module Stripe
907
907
  end
908
908
  end
909
909
 
910
+ class GiftCard < ::Stripe::StripeObject
911
+ # The brand of the gift card.
912
+ attr_reader :brand
913
+ # The expiration month of the gift card.
914
+ attr_reader :exp_month
915
+ # The expiration year of the gift card.
916
+ attr_reader :exp_year
917
+ # Uniquely identifies the gift card.
918
+ attr_reader :fingerprint
919
+ # The first six digits of the gift card number.
920
+ attr_reader :first6
921
+ # The last four digits of the gift card number.
922
+ attr_reader :last4
923
+
924
+ def self.inner_class_types
925
+ @inner_class_types = {}
926
+ end
927
+
928
+ def self.field_remappings
929
+ @field_remappings = {}
930
+ end
931
+ end
932
+
910
933
  class Giropay < ::Stripe::StripeObject
911
934
  def self.inner_class_types
912
935
  @inner_class_types = {}
@@ -1637,6 +1660,8 @@ module Stripe
1637
1660
  attr_reader :eps
1638
1661
  # Attribute for field fpx
1639
1662
  attr_reader :fpx
1663
+ # Attribute for field gift_card
1664
+ attr_reader :gift_card
1640
1665
  # Attribute for field giropay
1641
1666
  attr_reader :giropay
1642
1667
  # Attribute for field gopay
@@ -1867,6 +1892,7 @@ module Stripe
1867
1892
  customer_balance: CustomerBalance,
1868
1893
  eps: Eps,
1869
1894
  fpx: Fpx,
1895
+ gift_card: GiftCard,
1870
1896
  giropay: Giropay,
1871
1897
  gopay: Gopay,
1872
1898
  grabpay: Grabpay,