stripe 19.7.0.pre.alpha.2 → 19.7.0.pre.alpha.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e72679f32a96c0a30876ebb8c6fa8b6f6a58c1ebc15983a8c5a2fc4a6df9fcc6
4
- data.tar.gz: 97d5bd4a5f71d248c727f6c940762032e091848cde9a3db3065c2b3eea99f532
3
+ metadata.gz: b3e9493d61acb2af158d611ad82e3dc2cf7b36d07ee5fc0accc2f3dab6c4e13d
4
+ data.tar.gz: 91f91213e19c6fee06984cb3eb5158448f5e82d595967c667c93afff11a71a0a
5
5
  SHA512:
6
- metadata.gz: a3dded822a0d955deaecbb53a6e7c66a629ff3006a5d6851a4389bc9e07bada9e813c8bef4479971d100dd8aa178856fc18e4246680b155198c6ac8ec428cf12
7
- data.tar.gz: 21e7ada5f86507b7685a808a3f701de698b94ca2c3005667f06cb69a6d4f1265e6dfb92cd7ed4ab46995576ab882e5b406d41b0d8fddf824177903efba4ec1f1
6
+ metadata.gz: 5c4c6b3406dbe41f746b7a09415144758b7c6da83e21b83d32decee25fed88facfd46285643bb6ad395e167079cc0b2e9f740024a4d874f8027688c07021e383
7
+ data.tar.gz: a204443120957ba91c61f9d7028eb29566e34b51305f912c1580478f987ed075b305a548d091ca2dc58614a85d4c3ca4e34e99c804932b49fb1b81c0152ee72e
@@ -735,6 +735,8 @@ module Stripe
735
735
  @end_behavior = end_behavior
736
736
  end
737
737
  end
738
+ # A past timestamp to backdate the subscription's start date to.
739
+ attr_accessor :backdate_start_date
738
740
  # Configures when the subscription schedule's billing cycle anchors to a specific day of the week or month.
739
741
  attr_accessor :billing_cycle_anchor_config
740
742
  # Controls how prorations and invoices for subscriptions are calculated and orchestrated.
@@ -757,6 +759,7 @@ module Stripe
757
759
  attr_accessor :trial_settings
758
760
 
759
761
  def initialize(
762
+ backdate_start_date: nil,
760
763
  billing_cycle_anchor_config: nil,
761
764
  billing_mode: nil,
762
765
  description: nil,
@@ -768,6 +771,7 @@ module Stripe
768
771
  trial_period_days: nil,
769
772
  trial_settings: nil
770
773
  )
774
+ @backdate_start_date = backdate_start_date
771
775
  @billing_cycle_anchor_config = billing_cycle_anchor_config
772
776
  @billing_mode = billing_mode
773
777
  @description = description
@@ -3080,7 +3084,7 @@ module Stripe
3080
3084
  #
3081
3085
  # For `subscription` mode, there is a maximum of 20 line items and optional items with recurring Prices and 20 line items and optional items with one-time Prices.
3082
3086
  #
3083
- # You can't set this parameter if `ui_mode` is `custom`.
3087
+ # You can't set this parameter if `ui_mode` is `elements` or `form`.
3084
3088
  attr_accessor :optional_items
3085
3089
  # Where the user is coming from. This informs the optimizations that are applied to the session. You can't set this parameter if `ui_mode` is `elements`.
3086
3090
  attr_accessor :origin_context
@@ -175,7 +175,7 @@ module Stripe
175
175
  attr_accessor :expand
176
176
  # The customer's full name. This may be up to *150 characters*.
177
177
  attr_accessor :individual_name
178
- # The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers.
178
+ # The prefix for the customer used to generate unique invoice numbers. Must be 1–12 uppercase letters or numbers.
179
179
  attr_accessor :invoice_prefix
180
180
  # Default invoice settings for this customer.
181
181
  attr_accessor :invoice_settings
@@ -169,7 +169,7 @@ module Stripe
169
169
  attr_accessor :expand
170
170
  # The customer's full name. This may be up to *150 characters*.
171
171
  attr_accessor :individual_name
172
- # The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers.
172
+ # The prefix for the customer used to generate unique invoice numbers. Must be 1–12 uppercase letters or numbers.
173
173
  attr_accessor :invoice_prefix
174
174
  # Default invoice settings for this customer.
175
175
  attr_accessor :invoice_settings
@@ -164,6 +164,8 @@ module Stripe
164
164
  attr_accessor :tax
165
165
  # The unit cost of the line item represented in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). Required for L3 rates. An integer greater than or equal to 0.
166
166
  attr_accessor :unit_cost
167
+ # The number of decimal places implied in the unit_cost. For example, if unit_cost is 10000 and unit_cost_precision is 1, the actual unit cost is 1000.0. Defaults to 0 if not provided.
168
+ attr_accessor :unit_cost_precision
167
169
  # A unit of measure for the line item, such as gallons, feet, meters, etc.
168
170
  attr_accessor :unit_of_measure
169
171
 
@@ -176,6 +178,7 @@ module Stripe
176
178
  quantity_precision: nil,
177
179
  tax: nil,
178
180
  unit_cost: nil,
181
+ unit_cost_precision: nil,
179
182
  unit_of_measure: nil
180
183
  )
181
184
  @discount_amount = discount_amount
@@ -186,6 +189,7 @@ module Stripe
186
189
  @quantity_precision = quantity_precision
187
190
  @tax = tax
188
191
  @unit_cost = unit_cost
192
+ @unit_cost_precision = unit_cost_precision
189
193
  @unit_of_measure = unit_of_measure
190
194
  end
191
195
  end
@@ -173,6 +173,8 @@ module Stripe
173
173
  attr_accessor :tax
174
174
  # The unit cost of the line item represented in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). Required for L3 rates. An integer greater than or equal to 0.
175
175
  attr_accessor :unit_cost
176
+ # The number of decimal places implied in the unit_cost. For example, if unit_cost is 10000 and unit_cost_precision is 1, the actual unit cost is 1000.0. Defaults to 0 if not provided.
177
+ attr_accessor :unit_cost_precision
176
178
  # A unit of measure for the line item, such as gallons, feet, meters, etc.
177
179
  attr_accessor :unit_of_measure
178
180
 
@@ -185,6 +187,7 @@ module Stripe
185
187
  quantity_precision: nil,
186
188
  tax: nil,
187
189
  unit_cost: nil,
190
+ unit_cost_precision: nil,
188
191
  unit_of_measure: nil
189
192
  )
190
193
  @discount_amount = discount_amount
@@ -195,6 +198,7 @@ module Stripe
195
198
  @quantity_precision = quantity_precision
196
199
  @tax = tax
197
200
  @unit_cost = unit_cost
201
+ @unit_cost_precision = unit_cost_precision
198
202
  @unit_of_measure = unit_of_measure
199
203
  end
200
204
  end
@@ -173,6 +173,8 @@ module Stripe
173
173
  attr_accessor :tax
174
174
  # The unit cost of the line item represented in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). Required for L3 rates. An integer greater than or equal to 0.
175
175
  attr_accessor :unit_cost
176
+ # The number of decimal places implied in the unit_cost. For example, if unit_cost is 10000 and unit_cost_precision is 1, the actual unit cost is 1000.0. Defaults to 0 if not provided.
177
+ attr_accessor :unit_cost_precision
176
178
  # A unit of measure for the line item, such as gallons, feet, meters, etc.
177
179
  attr_accessor :unit_of_measure
178
180
 
@@ -185,6 +187,7 @@ module Stripe
185
187
  quantity_precision: nil,
186
188
  tax: nil,
187
189
  unit_cost: nil,
190
+ unit_cost_precision: nil,
188
191
  unit_of_measure: nil
189
192
  )
190
193
  @discount_amount = discount_amount
@@ -195,6 +198,7 @@ module Stripe
195
198
  @quantity_precision = quantity_precision
196
199
  @tax = tax
197
200
  @unit_cost = unit_cost
201
+ @unit_cost_precision = unit_cost_precision
198
202
  @unit_of_measure = unit_of_measure
199
203
  end
200
204
  end
@@ -164,6 +164,8 @@ module Stripe
164
164
  attr_accessor :tax
165
165
  # The unit cost of the line item represented in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). Required for L3 rates. An integer greater than or equal to 0.
166
166
  attr_accessor :unit_cost
167
+ # The number of decimal places implied in the unit_cost. For example, if unit_cost is 10000 and unit_cost_precision is 1, the actual unit cost is 1000.0. Defaults to 0 if not provided.
168
+ attr_accessor :unit_cost_precision
167
169
  # A unit of measure for the line item, such as gallons, feet, meters, etc.
168
170
  attr_accessor :unit_of_measure
169
171
 
@@ -176,6 +178,7 @@ module Stripe
176
178
  quantity_precision: nil,
177
179
  tax: nil,
178
180
  unit_cost: nil,
181
+ unit_cost_precision: nil,
179
182
  unit_of_measure: nil
180
183
  )
181
184
  @discount_amount = discount_amount
@@ -186,6 +189,7 @@ module Stripe
186
189
  @quantity_precision = quantity_precision
187
190
  @tax = tax
188
191
  @unit_cost = unit_cost
192
+ @unit_cost_precision = unit_cost_precision
189
193
  @unit_of_measure = unit_of_measure
190
194
  end
191
195
  end
@@ -164,6 +164,8 @@ module Stripe
164
164
  attr_accessor :tax
165
165
  # The unit cost of the line item represented in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). Required for L3 rates. An integer greater than or equal to 0.
166
166
  attr_accessor :unit_cost
167
+ # The number of decimal places implied in the unit_cost. For example, if unit_cost is 10000 and unit_cost_precision is 1, the actual unit cost is 1000.0. Defaults to 0 if not provided.
168
+ attr_accessor :unit_cost_precision
167
169
  # A unit of measure for the line item, such as gallons, feet, meters, etc.
168
170
  attr_accessor :unit_of_measure
169
171
 
@@ -176,6 +178,7 @@ module Stripe
176
178
  quantity_precision: nil,
177
179
  tax: nil,
178
180
  unit_cost: nil,
181
+ unit_cost_precision: nil,
179
182
  unit_of_measure: nil
180
183
  )
181
184
  @discount_amount = discount_amount
@@ -186,6 +189,7 @@ module Stripe
186
189
  @quantity_precision = quantity_precision
187
190
  @tax = tax
188
191
  @unit_cost = unit_cost
192
+ @unit_cost_precision = unit_cost_precision
189
193
  @unit_of_measure = unit_of_measure
190
194
  end
191
195
  end
@@ -173,6 +173,8 @@ module Stripe
173
173
  attr_accessor :tax
174
174
  # The unit cost of the line item represented in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). Required for L3 rates. An integer greater than or equal to 0.
175
175
  attr_accessor :unit_cost
176
+ # The number of decimal places implied in the unit_cost. For example, if unit_cost is 10000 and unit_cost_precision is 1, the actual unit cost is 1000.0. Defaults to 0 if not provided.
177
+ attr_accessor :unit_cost_precision
176
178
  # A unit of measure for the line item, such as gallons, feet, meters, etc.
177
179
  attr_accessor :unit_of_measure
178
180
 
@@ -185,6 +187,7 @@ module Stripe
185
187
  quantity_precision: nil,
186
188
  tax: nil,
187
189
  unit_cost: nil,
190
+ unit_cost_precision: nil,
188
191
  unit_of_measure: nil
189
192
  )
190
193
  @discount_amount = discount_amount
@@ -195,6 +198,7 @@ module Stripe
195
198
  @quantity_precision = quantity_precision
196
199
  @tax = tax
197
200
  @unit_cost = unit_cost
201
+ @unit_cost_precision = unit_cost_precision
198
202
  @unit_of_measure = unit_of_measure
199
203
  end
200
204
  end
@@ -21,6 +21,8 @@ module Stripe
21
21
  @lte = lte
22
22
  end
23
23
  end
24
+ # Only return trial offers that are active (`true`) or archived (`false`). If omitted, both active and archived trial offers are returned.
25
+ attr_accessor :active
24
26
  # Only return trial offers that were created during the given date interval.
25
27
  attr_accessor :created
26
28
  # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
@@ -35,6 +37,7 @@ module Stripe
35
37
  attr_accessor :starting_after
36
38
 
37
39
  def initialize(
40
+ active: nil,
38
41
  created: nil,
39
42
  ending_before: nil,
40
43
  expand: nil,
@@ -42,6 +45,7 @@ module Stripe
42
45
  prices: nil,
43
46
  starting_after: nil
44
47
  )
48
+ @active = active
45
49
  @created = created
46
50
  @ending_before = ending_before
47
51
  @expand = expand
@@ -3,9 +3,7 @@
3
3
 
4
4
  module Stripe
5
5
  module Capital
6
- # A financing summary object describes a connected account's financing status in real time.
7
- # A financing status is either `accepted`, `delivered`, or `none`.
8
- # You can read the status of your connected accounts.
6
+ # A financing summary object describes a connected account's financing details in real time.
9
7
  class FinancingSummary < SingletonAPIResource
10
8
  OBJECT_NAME = "capital.financing_summary"
11
9
  def self.object_name
@@ -1043,6 +1043,8 @@ module Stripe
1043
1043
  @field_remappings = {}
1044
1044
  end
1045
1045
  end
1046
+ # The Unix timestamp marking the subscription's backdated start date.
1047
+ attr_reader :backdate_start_date
1046
1048
  # The description for the subscription.
1047
1049
  attr_reader :description
1048
1050
  # The items in the subscription.
@@ -397,6 +397,119 @@ module Stripe
397
397
  @field_remappings = {}
398
398
  end
399
399
  end
400
+
401
+ class Signals < ::Stripe::StripeObject
402
+ class FraudulentEmail < ::Stripe::StripeObject
403
+ class Indicator < ::Stripe::StripeObject
404
+ # A brief explanation of how this indicator contributed to the risk level
405
+ attr_reader :explanation
406
+ # The effect this indicator had on the overall risk level.
407
+ attr_reader :impact
408
+ # The name of the specific indicator used in the risk assessment.
409
+ attr_reader :indicator
410
+
411
+ def self.inner_class_types
412
+ @inner_class_types = {}
413
+ end
414
+
415
+ def self.field_remappings
416
+ @field_remappings = {}
417
+ end
418
+ end
419
+ # Array of objects representing individual factors that contributed to the calculated risk level.
420
+ attr_reader :indicators
421
+ # Categorical assessment of the email risk.
422
+ attr_reader :risk_level
423
+
424
+ def self.inner_class_types
425
+ @inner_class_types = { indicators: Indicator }
426
+ end
427
+
428
+ def self.field_remappings
429
+ @field_remappings = {}
430
+ end
431
+ end
432
+
433
+ class FraudulentPerson < ::Stripe::StripeObject
434
+ class Indicator < ::Stripe::StripeObject
435
+ # A brief explanation of how this indicator contributed to the risk level
436
+ attr_reader :explanation
437
+ # The effect this indicator had on the overall risk level.
438
+ attr_reader :impact
439
+ # The name of the specific indicator used in the risk assessment.
440
+ attr_reader :indicator
441
+
442
+ def self.inner_class_types
443
+ @inner_class_types = {}
444
+ end
445
+
446
+ def self.field_remappings
447
+ @field_remappings = {}
448
+ end
449
+ end
450
+ # Array of objects representing individual factors that contributed to the calculated risk level.
451
+ attr_reader :indicators
452
+ # Categorical assessment of the fraudulent person risk.
453
+ attr_reader :risk_level
454
+
455
+ def self.inner_class_types
456
+ @inner_class_types = { indicators: Indicator }
457
+ end
458
+
459
+ def self.field_remappings
460
+ @field_remappings = {}
461
+ end
462
+ end
463
+
464
+ class FraudulentPhone < ::Stripe::StripeObject
465
+ class Indicator < ::Stripe::StripeObject
466
+ # A brief explanation of how this indicator contributed to the risk level
467
+ attr_reader :explanation
468
+ # The effect this indicator had on the overall risk level.
469
+ attr_reader :impact
470
+ # The name of the specific indicator used in the risk assessment.
471
+ attr_reader :indicator
472
+
473
+ def self.inner_class_types
474
+ @inner_class_types = {}
475
+ end
476
+
477
+ def self.field_remappings
478
+ @field_remappings = {}
479
+ end
480
+ end
481
+ # Array of objects representing individual factors that contributed to the calculated risk level.
482
+ attr_reader :indicators
483
+ # Categorical assessment of the phone risk.
484
+ attr_reader :risk_level
485
+
486
+ def self.inner_class_types
487
+ @inner_class_types = { indicators: Indicator }
488
+ end
489
+
490
+ def self.field_remappings
491
+ @field_remappings = {}
492
+ end
493
+ end
494
+ # Attribute for field fraudulent_email
495
+ attr_reader :fraudulent_email
496
+ # Attribute for field fraudulent_person
497
+ attr_reader :fraudulent_person
498
+ # Attribute for field fraudulent_phone
499
+ attr_reader :fraudulent_phone
500
+
501
+ def self.inner_class_types
502
+ @inner_class_types = {
503
+ fraudulent_email: FraudulentEmail,
504
+ fraudulent_person: FraudulentPerson,
505
+ fraudulent_phone: FraudulentPhone,
506
+ }
507
+ end
508
+
509
+ def self.field_remappings
510
+ @field_remappings = {}
511
+ end
512
+ end
400
513
  # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems.
401
514
  attr_reader :client_reference_id
402
515
  # Time at which the object was created. Measured in seconds since the Unix epoch.
@@ -419,6 +532,8 @@ module Stripe
419
532
  attr_reader :phone
420
533
  # Result from a selfie check
421
534
  attr_reader :selfie
535
+ # Attribute for field signals
536
+ attr_reader :signals
422
537
  # Type of report.
423
538
  attr_reader :type
424
539
  # The configuration token of a verification flow from the dashboard.
@@ -444,6 +559,7 @@ module Stripe
444
559
  options: Options,
445
560
  phone: Phone,
446
561
  selfie: Selfie,
562
+ signals: Signals,
447
563
  }
448
564
  end
449
565
 
@@ -1042,6 +1042,8 @@ module Stripe
1042
1042
  attr_reader :merchant_currency
1043
1043
  # Details about the authorization request, such as identifiers, set by the card network.
1044
1044
  attr_reader :network_data
1045
+ # The network-specific response code associated with Stripe's decision for this authorization request. The value is a Visa or Mastercard response code depending on the network over which the authorization was routed.
1046
+ attr_reader :network_response_code
1045
1047
  # The card network's estimate of the likelihood that an authorization is fraudulent. Takes on values between 1 and 99.
1046
1048
  attr_reader :network_risk_score
1047
1049
  # When an authorization is approved or declined by you or by Stripe, this field provides additional detail on the reason for the outcome.
@@ -171,6 +171,8 @@ module Stripe
171
171
  attr_reader :tax
172
172
  # The unit cost of the line item represented in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). Required for L3 rates. An integer greater than or equal to 0.
173
173
  attr_reader :unit_cost
174
+ # The number of decimal places implied in the unit_cost. For example, if unit_cost is 10000 and unit_cost_precision is 1, the actual unit cost is 1000.0. Defaults to 0 if not provided.
175
+ attr_reader :unit_cost_precision
174
176
  # A unit of measure for the line item, such as gallons, feet, meters, etc. Required for L3 rates. At most 12 alphanumeric characters long.
175
177
  attr_reader :unit_of_measure
176
178
 
@@ -146,6 +146,8 @@ module Stripe
146
146
  end
147
147
  # The amount of tax, in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units).
148
148
  attr_reader :amount
149
+ # The ID of the [customer tax exemption](/api/tax/exemptions) that was applied to this tax breakdown.
150
+ attr_reader :customer_tax_exemption
149
151
  # Attribute for field jurisdiction
150
152
  attr_reader :jurisdiction
151
153
  # Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address).
@@ -82,6 +82,8 @@ module Stripe
82
82
  end
83
83
  # The amount of tax, in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units).
84
84
  attr_reader :amount
85
+ # The ID of the [customer tax exemption](/api/tax/exemptions) that was applied to this tax breakdown.
86
+ attr_reader :customer_tax_exemption
85
87
  # Attribute for field jurisdiction
86
88
  attr_reader :jurisdiction
87
89
  # Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address).
@@ -157,6 +157,8 @@ module Stripe
157
157
  end
158
158
  # The amount of tax, in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units).
159
159
  attr_reader :amount
160
+ # The ID of the [customer tax exemption](/api/tax/exemptions) that was applied to this tax breakdown.
161
+ attr_reader :customer_tax_exemption
160
162
  # Attribute for field jurisdiction
161
163
  attr_reader :jurisdiction
162
164
  # Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address).
@@ -206,7 +206,7 @@ module Stripe
206
206
  #
207
207
  # You can retrieve a PaymentIntent client-side using a publishable key when the client_secret is in the query string.
208
208
  #
209
- # If you retrieve a PaymentIntent with a publishable key, it only returns a subset of properties. Refer to the [payment intent](https://docs.stripe.com/api#payment_intent_object) object reference for more details.
209
+ # If you retrieve a PaymentIntent with a publishable key, it only returns a subset of properties. Refer to the [payment intent](https://docs.stripe.com/api/payment_intents/object) object reference for more details.
210
210
  def retrieve(intent, params = {}, opts = {})
211
211
  request(
212
212
  method: :get,
@@ -13,7 +13,7 @@ module Stripe
13
13
 
14
14
  # Creates a new StripeContext with the given segments.
15
15
  def initialize(segments = nil)
16
- @segments = (segments || []).map(&:to_s).freeze
16
+ @segments = (segments || []).map { |segment| (segment.is_a?(String) ? segment.dup : segment.to_s).freeze }.freeze
17
17
  end
18
18
 
19
19
  # Parses a context string into a StripeContext instance.
@@ -54,6 +54,12 @@ module Stripe
54
54
  # Alias for == to support eql? method
55
55
  alias eql? ==
56
56
 
57
+ # As with equality in #== and #eql?, contexts with equivalent segments
58
+ # hash to the same value.
59
+ def hash
60
+ @segments.hash
61
+ end
62
+
57
63
  # Returns a human-readable representation for debugging.
58
64
  def inspect
59
65
  "#<#{self.class}:0x#{object_id.to_s(16)} segments=#{@segments.inspect}>"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stripe
4
- VERSION = "19.7.0-alpha.2"
4
+ VERSION = "19.7.0-alpha.3"
5
5
  end