stripe 15.5.0.pre.beta.2 → 15.6.0.pre.alpha.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.
- checksums.yaml +4 -4
- data/API_VERSION +1 -1
- data/CHANGELOG.md +117 -1
- data/OPENAPI_VERSION +1 -1
- data/README.md +6 -4
- data/VERSION +1 -1
- data/lib/stripe/api_requestor.rb +20 -18
- data/lib/stripe/api_version.rb +1 -1
- data/lib/stripe/errors.rb +26 -23
- data/lib/stripe/event_types.rb +83 -0
- data/lib/stripe/events/v2_billing_cadence_billed_event.rb +21 -0
- data/lib/stripe/events/v2_billing_cadence_canceled_event.rb +21 -0
- data/lib/stripe/events/v2_billing_cadence_created_event.rb +23 -0
- data/lib/stripe/events/v2_billing_cadence_errored_event.rb +21 -0
- data/lib/stripe/events/v2_billing_license_fee_created_event.rb +21 -0
- data/lib/stripe/events/v2_billing_license_fee_updated_event.rb +21 -0
- data/lib/stripe/events/v2_billing_license_fee_version_created_event.rb +23 -0
- data/lib/stripe/events/v2_billing_licensed_item_created_event.rb +21 -0
- data/lib/stripe/events/v2_billing_licensed_item_updated_event.rb +21 -0
- data/lib/stripe/events/v2_billing_metered_item_created_event.rb +21 -0
- data/lib/stripe/events/v2_billing_metered_item_updated_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_component_created_event.rb +23 -0
- data/lib/stripe/events/v2_billing_pricing_plan_component_updated_event.rb +23 -0
- data/lib/stripe/events/v2_billing_pricing_plan_created_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_awaiting_customer_action_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_current_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_past_due_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_paused_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_unpaid_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_subscription_servicing_activated_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_subscription_servicing_canceled_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_subscription_servicing_paused_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_updated_event.rb +21 -0
- data/lib/stripe/events/v2_billing_pricing_plan_version_created_event.rb +23 -0
- data/lib/stripe/events/v2_billing_rate_card_created_event.rb +23 -0
- data/lib/stripe/events/v2_billing_rate_card_rate_created_event.rb +23 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_activated_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_canceled_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_collection_awaiting_customer_action_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_collection_current_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_collection_past_due_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_collection_paused_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_collection_unpaid_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_servicing_activated_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_servicing_canceled_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_subscription_servicing_paused_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_updated_event.rb +21 -0
- data/lib/stripe/events/v2_billing_rate_card_version_created_event.rb +23 -0
- data/lib/stripe/events/v2_core_health_api_error_firing_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_api_error_resolved_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_api_latency_firing_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_api_latency_resolved_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_authorization_rate_drop_firing_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_authorization_rate_drop_resolved_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_event_generation_failure_resolved_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_fraud_rate_increased_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_issuing_authorization_request_timeout_firing_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_issuing_authorization_request_timeout_resolved_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_payment_method_error_firing_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_payment_method_error_resolved_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_traffic_volume_drop_firing_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_traffic_volume_drop_resolved_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_webhook_latency_firing_event.rb +13 -0
- data/lib/stripe/events/v2_core_health_webhook_latency_resolved_event.rb +13 -0
- data/lib/stripe/events/v2_reporting_report_run_created_event.rb +21 -0
- data/lib/stripe/events/v2_reporting_report_run_failed_event.rb +21 -0
- data/lib/stripe/events/v2_reporting_report_run_succeeded_event.rb +21 -0
- data/lib/stripe/events/v2_reporting_report_run_updated_event.rb +21 -0
- data/lib/stripe/object_types.rb +27 -0
- data/lib/stripe/resources/account.rb +2 -2
- data/lib/stripe/resources/account_session.rb +94 -13
- data/lib/stripe/resources/balance.rb +2 -7
- data/lib/stripe/resources/balance_settings.rb +72 -65
- data/lib/stripe/resources/billing/alert.rb +128 -1
- data/lib/stripe/resources/billing/alert_triggered.rb +6 -0
- data/lib/stripe/resources/billing/credit_balance_summary.rb +50 -0
- data/lib/stripe/resources/billing/credit_balance_transaction.rb +50 -0
- data/lib/stripe/resources/billing/credit_grant.rb +61 -2
- data/lib/stripe/resources/billing/meter.rb +2 -2
- data/lib/stripe/resources/billing/meter_usage_row.rb +1 -1
- data/lib/stripe/resources/billing_portal/configuration.rb +12 -2
- data/lib/stripe/resources/charge.rb +36 -5
- data/lib/stripe/resources/checkout/session.rb +237 -6
- data/lib/stripe/resources/credit_note.rb +3 -3
- data/lib/stripe/resources/dispute.rb +1 -1
- data/lib/stripe/resources/file.rb +1 -1
- data/lib/stripe/resources/file_link.rb +1 -1
- data/lib/stripe/resources/invoice.rb +55 -1
- data/lib/stripe/resources/invoice_item.rb +48 -0
- data/lib/stripe/resources/invoice_line_item.rb +52 -0
- data/lib/stripe/resources/invoice_payment.rb +1 -1
- data/lib/stripe/resources/mandate.rb +65 -1
- data/lib/stripe/resources/payment_attempt_record.rb +86 -10
- data/lib/stripe/resources/payment_intent.rb +182 -4
- data/lib/stripe/resources/payment_link.rb +1 -1
- data/lib/stripe/resources/payment_method.rb +2 -0
- data/lib/stripe/resources/payment_record.rb +107 -14
- data/lib/stripe/resources/promotion_code.rb +5 -2
- data/lib/stripe/resources/quote_preview_invoice.rb +8 -1
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +24 -0
- data/lib/stripe/resources/setup_attempt.rb +4 -1
- data/lib/stripe/resources/setup_intent.rb +194 -1
- data/lib/stripe/resources/subscription.rb +145 -9
- data/lib/stripe/resources/subscription_schedule.rb +124 -2
- data/lib/stripe/resources/terminal/configuration.rb +82 -0
- data/lib/stripe/resources/terminal/reader.rb +22 -0
- data/lib/stripe/resources/v2/billing/bill_setting.rb +62 -0
- data/lib/stripe/resources/v2/billing/bill_setting_version.rb +50 -0
- data/lib/stripe/resources/v2/billing/cadence.rb +182 -0
- data/lib/stripe/resources/v2/billing/collection_setting.rb +148 -0
- data/lib/stripe/resources/v2/billing/collection_setting_version.rb +136 -0
- data/lib/stripe/resources/v2/billing/custom_pricing_unit.rb +35 -0
- data/lib/stripe/resources/v2/billing/intent.rb +59 -0
- data/lib/stripe/resources/v2/billing/intent_action.rb +200 -0
- data/lib/stripe/resources/v2/billing/license_fee.rb +79 -0
- data/lib/stripe/resources/v2/billing/license_fee_subscription.rb +36 -0
- data/lib/stripe/resources/v2/billing/license_fee_version.rb +56 -0
- data/lib/stripe/resources/v2/billing/licensed_item.rb +44 -0
- data/lib/stripe/resources/v2/billing/metered_item.rb +58 -0
- data/lib/stripe/resources/v2/billing/pricing_plan.rb +43 -0
- data/lib/stripe/resources/v2/billing/pricing_plan_component.rb +58 -0
- data/lib/stripe/resources/v2/billing/pricing_plan_subscription.rb +63 -0
- data/lib/stripe/resources/v2/billing/pricing_plan_version.rb +30 -0
- data/lib/stripe/resources/v2/billing/profile.rb +38 -0
- data/lib/stripe/resources/v2/billing/rate_card.rb +53 -0
- data/lib/stripe/resources/v2/billing/rate_card_rate.rb +71 -0
- data/lib/stripe/resources/v2/billing/rate_card_subscription.rb +63 -0
- data/lib/stripe/resources/v2/billing/rate_card_version.rb +26 -0
- data/lib/stripe/resources/v2/billing/service_action.rb +117 -0
- data/lib/stripe/resources/v2/core/account.rb +8 -0
- data/lib/stripe/resources/v2/core/claimable_sandbox.rb +57 -0
- data/lib/stripe/resources/v2/event.rb +2 -0
- data/lib/stripe/resources/v2/money_management/financial_account.rb +4 -2
- data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +1 -1
- data/lib/stripe/resources/v2/money_management/transaction.rb +2 -0
- data/lib/stripe/resources/v2/money_management/transaction_entry.rb +2 -0
- data/lib/stripe/resources/v2/reporting/report.rb +64 -0
- data/lib/stripe/resources/v2/reporting/report_run.rb +89 -0
- data/lib/stripe/resources/v2/tax/automatic_rule.rb +31 -0
- data/lib/stripe/resources.rb +85 -0
- data/lib/stripe/services/account_session_service.rb +64 -13
- data/lib/stripe/services/balance_settings_service.rb +44 -41
- data/lib/stripe/services/billing/alert_service.rb +75 -1
- data/lib/stripe/services/billing/credit_balance_summary_service.rb +13 -1
- data/lib/stripe/services/billing/credit_grant_service.rb +29 -2
- data/lib/stripe/services/billing/meter_service.rb +1 -1
- data/lib/stripe/services/billing_portal/configuration_service.rb +10 -2
- data/lib/stripe/services/checkout/session_service.rb +166 -5
- data/lib/stripe/services/credit_note_preview_lines_service.rb +1 -1
- data/lib/stripe/services/credit_note_service.rb +2 -2
- data/lib/stripe/services/customer_service.rb +4 -4
- data/lib/stripe/services/file_link_service.rb +1 -1
- data/lib/stripe/services/file_service.rb +1 -1
- data/lib/stripe/services/invoice_payment_service.rb +1 -1
- data/lib/stripe/services/invoice_service.rb +47 -0
- data/lib/stripe/services/mandate_service.rb +40 -0
- data/lib/stripe/services/payment_attempt_record_service.rb +4 -1
- data/lib/stripe/services/payment_intent_service.rb +157 -3
- data/lib/stripe/services/payment_link_service.rb +1 -1
- data/lib/stripe/services/payment_record_service.rb +25 -5
- data/lib/stripe/services/quote_service.rb +4 -4
- data/lib/stripe/services/setup_intent_service.rb +153 -0
- data/lib/stripe/services/subscription_schedule_service.rb +100 -2
- data/lib/stripe/services/subscription_service.rb +134 -9
- data/lib/stripe/services/terminal/configuration_service.rb +64 -0
- data/lib/stripe/services/test_helpers/terminal/reader_service.rb +22 -0
- data/lib/stripe/services/v1_services.rb +5 -5
- data/lib/stripe/services/v2/billing/bill_setting_service.rb +214 -0
- data/lib/stripe/services/v2/billing/bill_settings/version_service.rb +45 -0
- data/lib/stripe/services/v2/billing/cadence_service.rb +428 -0
- data/lib/stripe/services/v2/billing/collection_setting_service.rb +518 -0
- data/lib/stripe/services/v2/billing/collection_settings/version_service.rb +45 -0
- data/lib/stripe/services/v2/billing/custom_pricing_unit_service.rb +108 -0
- data/lib/stripe/services/v2/billing/intent_service.rb +465 -0
- data/lib/stripe/services/v2/billing/intents/action_service.rb +45 -0
- data/lib/stripe/services/v2/billing/license_fee_service.rb +250 -0
- data/lib/stripe/services/v2/billing/license_fee_subscription_service.rb +23 -0
- data/lib/stripe/services/v2/billing/license_fees/version_service.rb +45 -0
- data/lib/stripe/services/v2/billing/licensed_item_service.rb +149 -0
- data/lib/stripe/services/v2/billing/metered_item_service.rb +176 -0
- data/lib/stripe/services/v2/billing/pricing_plan_service.rb +142 -0
- data/lib/stripe/services/v2/billing/pricing_plan_subscription_service.rb +76 -0
- data/lib/stripe/services/v2/billing/pricing_plans/component_service.rb +162 -0
- data/lib/stripe/services/v2/billing/pricing_plans/version_service.rb +45 -0
- data/lib/stripe/services/v2/billing/profile_service.rb +144 -0
- data/lib/stripe/services/v2/billing/rate_card_service.rb +151 -0
- data/lib/stripe/services/v2/billing/rate_card_subscription_service.rb +144 -0
- data/lib/stripe/services/v2/billing/rate_cards/rate_service.rb +161 -0
- data/lib/stripe/services/v2/billing/rate_cards/version_service.rb +45 -0
- data/lib/stripe/services/v2/billing/service_action_service.rb +259 -0
- data/lib/stripe/services/v2/billing_service.rb +19 -2
- data/lib/stripe/services/v2/core/account_service.rb +16 -2
- data/lib/stripe/services/v2/core/claimable_sandbox_service.rb +50 -0
- data/lib/stripe/services/v2/core_service.rb +4 -3
- data/lib/stripe/services/v2/money_management/financial_account_service.rb +4 -1
- data/lib/stripe/services/v2/money_management_service.rb +3 -3
- data/lib/stripe/services/v2/reporting/report_run_service.rb +88 -0
- data/lib/stripe/services/v2/reporting/report_service.rb +25 -0
- data/lib/stripe/services/v2/reporting_service.rb +16 -0
- data/lib/stripe/services/v2/tax/automatic_rule_service.rb +99 -0
- data/lib/stripe/services/v2/tax_service.rb +15 -0
- data/lib/stripe/services/v2_services.rb +3 -1
- data/lib/stripe/services.rb +29 -0
- data/lib/stripe/stripe_service.rb +3 -1
- data/lib/stripe/version.rb +1 -1
- metadata +116 -3
- data/rbi/stripe.rbi +0 -199145
@@ -128,8 +128,32 @@ module Stripe
|
|
128
128
|
# ID of the promotion code to create a new discount for.
|
129
129
|
attr_reader :promotion_code
|
130
130
|
end
|
131
|
+
|
132
|
+
class Period < Stripe::StripeObject
|
133
|
+
class End < Stripe::StripeObject
|
134
|
+
# A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`.
|
135
|
+
attr_reader :timestamp
|
136
|
+
# Select how to calculate the end of the invoice item period.
|
137
|
+
attr_reader :type
|
138
|
+
end
|
139
|
+
|
140
|
+
class Start < Stripe::StripeObject
|
141
|
+
# A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`.
|
142
|
+
attr_reader :timestamp
|
143
|
+
# Select how to calculate the start of the invoice item period.
|
144
|
+
attr_reader :type
|
145
|
+
end
|
146
|
+
# Attribute for field end
|
147
|
+
attr_reader :end
|
148
|
+
# Attribute for field start
|
149
|
+
attr_reader :start
|
150
|
+
end
|
131
151
|
# The stackable discounts that will be applied to the item.
|
132
152
|
attr_reader :discounts
|
153
|
+
# 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.
|
154
|
+
attr_reader :metadata
|
155
|
+
# Attribute for field period
|
156
|
+
attr_reader :period
|
133
157
|
# ID of the price used to generate the invoice item.
|
134
158
|
attr_reader :price
|
135
159
|
# The quantity of the invoice item.
|
@@ -614,6 +638,41 @@ module Stripe
|
|
614
638
|
end
|
615
639
|
end
|
616
640
|
|
641
|
+
class Period < Stripe::RequestParams
|
642
|
+
class End < Stripe::RequestParams
|
643
|
+
# A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`.
|
644
|
+
attr_accessor :timestamp
|
645
|
+
# Select how to calculate the end of the invoice item period.
|
646
|
+
attr_accessor :type
|
647
|
+
|
648
|
+
def initialize(timestamp: nil, type: nil)
|
649
|
+
@timestamp = timestamp
|
650
|
+
@type = type
|
651
|
+
end
|
652
|
+
end
|
653
|
+
|
654
|
+
class Start < Stripe::RequestParams
|
655
|
+
# A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`.
|
656
|
+
attr_accessor :timestamp
|
657
|
+
# Select how to calculate the start of the invoice item period.
|
658
|
+
attr_accessor :type
|
659
|
+
|
660
|
+
def initialize(timestamp: nil, type: nil)
|
661
|
+
@timestamp = timestamp
|
662
|
+
@type = type
|
663
|
+
end
|
664
|
+
end
|
665
|
+
# End of the invoice item period.
|
666
|
+
attr_accessor :end
|
667
|
+
# Start of the invoice item period.
|
668
|
+
attr_accessor :start
|
669
|
+
|
670
|
+
def initialize(end_: nil, start: nil)
|
671
|
+
@end = end_
|
672
|
+
@start = start
|
673
|
+
end
|
674
|
+
end
|
675
|
+
|
617
676
|
class PriceData < Stripe::RequestParams
|
618
677
|
# 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).
|
619
678
|
attr_accessor :currency
|
@@ -642,6 +701,10 @@ module Stripe
|
|
642
701
|
end
|
643
702
|
# The coupons to redeem into discounts for the item.
|
644
703
|
attr_accessor :discounts
|
704
|
+
# 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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
705
|
+
attr_accessor :metadata
|
706
|
+
# The period associated with this invoice item. Defaults to the period of the underlying subscription that surrounds the start of the phase.
|
707
|
+
attr_accessor :period
|
645
708
|
# The ID of the price object. One of `price` or `price_data` is required.
|
646
709
|
attr_accessor :price
|
647
710
|
# Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
@@ -651,8 +714,18 @@ module Stripe
|
|
651
714
|
# The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
|
652
715
|
attr_accessor :tax_rates
|
653
716
|
|
654
|
-
def initialize(
|
717
|
+
def initialize(
|
718
|
+
discounts: nil,
|
719
|
+
metadata: nil,
|
720
|
+
period: nil,
|
721
|
+
price: nil,
|
722
|
+
price_data: nil,
|
723
|
+
quantity: nil,
|
724
|
+
tax_rates: nil
|
725
|
+
)
|
655
726
|
@discounts = discounts
|
727
|
+
@metadata = metadata
|
728
|
+
@period = period
|
656
729
|
@price = price
|
657
730
|
@price_data = price_data
|
658
731
|
@quantity = quantity
|
@@ -1297,6 +1370,41 @@ module Stripe
|
|
1297
1370
|
end
|
1298
1371
|
end
|
1299
1372
|
|
1373
|
+
class Period < Stripe::RequestParams
|
1374
|
+
class End < Stripe::RequestParams
|
1375
|
+
# A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`.
|
1376
|
+
attr_accessor :timestamp
|
1377
|
+
# Select how to calculate the end of the invoice item period.
|
1378
|
+
attr_accessor :type
|
1379
|
+
|
1380
|
+
def initialize(timestamp: nil, type: nil)
|
1381
|
+
@timestamp = timestamp
|
1382
|
+
@type = type
|
1383
|
+
end
|
1384
|
+
end
|
1385
|
+
|
1386
|
+
class Start < Stripe::RequestParams
|
1387
|
+
# A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`.
|
1388
|
+
attr_accessor :timestamp
|
1389
|
+
# Select how to calculate the start of the invoice item period.
|
1390
|
+
attr_accessor :type
|
1391
|
+
|
1392
|
+
def initialize(timestamp: nil, type: nil)
|
1393
|
+
@timestamp = timestamp
|
1394
|
+
@type = type
|
1395
|
+
end
|
1396
|
+
end
|
1397
|
+
# End of the invoice item period.
|
1398
|
+
attr_accessor :end
|
1399
|
+
# Start of the invoice item period.
|
1400
|
+
attr_accessor :start
|
1401
|
+
|
1402
|
+
def initialize(end_: nil, start: nil)
|
1403
|
+
@end = end_
|
1404
|
+
@start = start
|
1405
|
+
end
|
1406
|
+
end
|
1407
|
+
|
1300
1408
|
class PriceData < Stripe::RequestParams
|
1301
1409
|
# 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).
|
1302
1410
|
attr_accessor :currency
|
@@ -1325,6 +1433,10 @@ module Stripe
|
|
1325
1433
|
end
|
1326
1434
|
# The coupons to redeem into discounts for the item.
|
1327
1435
|
attr_accessor :discounts
|
1436
|
+
# 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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
1437
|
+
attr_accessor :metadata
|
1438
|
+
# The period associated with this invoice item. Defaults to the period of the underlying subscription that surrounds the start of the phase.
|
1439
|
+
attr_accessor :period
|
1328
1440
|
# The ID of the price object. One of `price` or `price_data` is required.
|
1329
1441
|
attr_accessor :price
|
1330
1442
|
# Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
@@ -1334,8 +1446,18 @@ module Stripe
|
|
1334
1446
|
# The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
|
1335
1447
|
attr_accessor :tax_rates
|
1336
1448
|
|
1337
|
-
def initialize(
|
1449
|
+
def initialize(
|
1450
|
+
discounts: nil,
|
1451
|
+
metadata: nil,
|
1452
|
+
period: nil,
|
1453
|
+
price: nil,
|
1454
|
+
price_data: nil,
|
1455
|
+
quantity: nil,
|
1456
|
+
tax_rates: nil
|
1457
|
+
)
|
1338
1458
|
@discounts = discounts
|
1459
|
+
@metadata = metadata
|
1460
|
+
@period = period
|
1339
1461
|
@price = price
|
1340
1462
|
@price_data = price_data
|
1341
1463
|
@quantity = quantity
|
@@ -26,6 +26,11 @@ module Stripe
|
|
26
26
|
attr_reader :enabled
|
27
27
|
end
|
28
28
|
|
29
|
+
class ReaderSecurity < Stripe::StripeObject
|
30
|
+
# Passcode used to access a reader's admin menu.
|
31
|
+
attr_reader :admin_menu_passcode
|
32
|
+
end
|
33
|
+
|
29
34
|
class RebootWindow < Stripe::StripeObject
|
30
35
|
# Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour.
|
31
36
|
attr_reader :end_hour
|
@@ -147,6 +152,15 @@ module Stripe
|
|
147
152
|
attr_reader :smart_tip_threshold
|
148
153
|
end
|
149
154
|
|
155
|
+
class Mxn < Stripe::StripeObject
|
156
|
+
# Fixed amounts displayed when collecting a tip
|
157
|
+
attr_reader :fixed_amounts
|
158
|
+
# Percentages displayed when collecting a tip
|
159
|
+
attr_reader :percentages
|
160
|
+
# Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
|
161
|
+
attr_reader :smart_tip_threshold
|
162
|
+
end
|
163
|
+
|
150
164
|
class Myr < Stripe::StripeObject
|
151
165
|
# Fixed amounts displayed when collecting a tip
|
152
166
|
attr_reader :fixed_amounts
|
@@ -242,6 +256,8 @@ module Stripe
|
|
242
256
|
attr_reader :huf
|
243
257
|
# Attribute for field jpy
|
244
258
|
attr_reader :jpy
|
259
|
+
# Attribute for field mxn
|
260
|
+
attr_reader :mxn
|
245
261
|
# Attribute for field myr
|
246
262
|
attr_reader :myr
|
247
263
|
# Attribute for field nok
|
@@ -327,6 +343,15 @@ module Stripe
|
|
327
343
|
end
|
328
344
|
end
|
329
345
|
|
346
|
+
class ReaderSecurity < Stripe::RequestParams
|
347
|
+
# Passcode used to access a reader's admin menu.
|
348
|
+
attr_accessor :admin_menu_passcode
|
349
|
+
|
350
|
+
def initialize(admin_menu_passcode: nil)
|
351
|
+
@admin_menu_passcode = admin_menu_passcode
|
352
|
+
end
|
353
|
+
end
|
354
|
+
|
330
355
|
class RebootWindow < Stripe::RequestParams
|
331
356
|
# Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour.
|
332
357
|
attr_accessor :end_hour
|
@@ -529,6 +554,21 @@ module Stripe
|
|
529
554
|
end
|
530
555
|
end
|
531
556
|
|
557
|
+
class Mxn < Stripe::RequestParams
|
558
|
+
# Fixed amounts displayed when collecting a tip
|
559
|
+
attr_accessor :fixed_amounts
|
560
|
+
# Percentages displayed when collecting a tip
|
561
|
+
attr_accessor :percentages
|
562
|
+
# Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
|
563
|
+
attr_accessor :smart_tip_threshold
|
564
|
+
|
565
|
+
def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
|
566
|
+
@fixed_amounts = fixed_amounts
|
567
|
+
@percentages = percentages
|
568
|
+
@smart_tip_threshold = smart_tip_threshold
|
569
|
+
end
|
570
|
+
end
|
571
|
+
|
532
572
|
class Myr < Stripe::RequestParams
|
533
573
|
# Fixed amounts displayed when collecting a tip
|
534
574
|
attr_accessor :fixed_amounts
|
@@ -672,6 +712,8 @@ module Stripe
|
|
672
712
|
attr_accessor :huf
|
673
713
|
# Tipping configuration for JPY
|
674
714
|
attr_accessor :jpy
|
715
|
+
# Tipping configuration for MXN
|
716
|
+
attr_accessor :mxn
|
675
717
|
# Tipping configuration for MYR
|
676
718
|
attr_accessor :myr
|
677
719
|
# Tipping configuration for NOK
|
@@ -702,6 +744,7 @@ module Stripe
|
|
702
744
|
hkd: nil,
|
703
745
|
huf: nil,
|
704
746
|
jpy: nil,
|
747
|
+
mxn: nil,
|
705
748
|
myr: nil,
|
706
749
|
nok: nil,
|
707
750
|
nzd: nil,
|
@@ -723,6 +766,7 @@ module Stripe
|
|
723
766
|
@hkd = hkd
|
724
767
|
@huf = huf
|
725
768
|
@jpy = jpy
|
769
|
+
@mxn = mxn
|
726
770
|
@myr = myr
|
727
771
|
@nok = nok
|
728
772
|
@nzd = nzd
|
@@ -829,6 +873,8 @@ module Stripe
|
|
829
873
|
attr_accessor :name
|
830
874
|
# Configurations for collecting transactions offline.
|
831
875
|
attr_accessor :offline
|
876
|
+
# Configurations for reader security settings.
|
877
|
+
attr_accessor :reader_security
|
832
878
|
# Reboot time settings for readers that support customized reboot time configuration.
|
833
879
|
attr_accessor :reboot_window
|
834
880
|
# An object containing device type specific settings for Stripe S700 readers
|
@@ -845,6 +891,7 @@ module Stripe
|
|
845
891
|
expand: nil,
|
846
892
|
name: nil,
|
847
893
|
offline: nil,
|
894
|
+
reader_security: nil,
|
848
895
|
reboot_window: nil,
|
849
896
|
stripe_s700: nil,
|
850
897
|
tipping: nil,
|
@@ -855,6 +902,7 @@ module Stripe
|
|
855
902
|
@expand = expand
|
856
903
|
@name = name
|
857
904
|
@offline = offline
|
905
|
+
@reader_security = reader_security
|
858
906
|
@reboot_window = reboot_window
|
859
907
|
@stripe_s700 = stripe_s700
|
860
908
|
@tipping = tipping
|
@@ -909,6 +957,15 @@ module Stripe
|
|
909
957
|
end
|
910
958
|
end
|
911
959
|
|
960
|
+
class ReaderSecurity < Stripe::RequestParams
|
961
|
+
# Passcode used to access a reader's admin menu.
|
962
|
+
attr_accessor :admin_menu_passcode
|
963
|
+
|
964
|
+
def initialize(admin_menu_passcode: nil)
|
965
|
+
@admin_menu_passcode = admin_menu_passcode
|
966
|
+
end
|
967
|
+
end
|
968
|
+
|
912
969
|
class RebootWindow < Stripe::RequestParams
|
913
970
|
# Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour.
|
914
971
|
attr_accessor :end_hour
|
@@ -1111,6 +1168,21 @@ module Stripe
|
|
1111
1168
|
end
|
1112
1169
|
end
|
1113
1170
|
|
1171
|
+
class Mxn < Stripe::RequestParams
|
1172
|
+
# Fixed amounts displayed when collecting a tip
|
1173
|
+
attr_accessor :fixed_amounts
|
1174
|
+
# Percentages displayed when collecting a tip
|
1175
|
+
attr_accessor :percentages
|
1176
|
+
# Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
|
1177
|
+
attr_accessor :smart_tip_threshold
|
1178
|
+
|
1179
|
+
def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
|
1180
|
+
@fixed_amounts = fixed_amounts
|
1181
|
+
@percentages = percentages
|
1182
|
+
@smart_tip_threshold = smart_tip_threshold
|
1183
|
+
end
|
1184
|
+
end
|
1185
|
+
|
1114
1186
|
class Myr < Stripe::RequestParams
|
1115
1187
|
# Fixed amounts displayed when collecting a tip
|
1116
1188
|
attr_accessor :fixed_amounts
|
@@ -1254,6 +1326,8 @@ module Stripe
|
|
1254
1326
|
attr_accessor :huf
|
1255
1327
|
# Tipping configuration for JPY
|
1256
1328
|
attr_accessor :jpy
|
1329
|
+
# Tipping configuration for MXN
|
1330
|
+
attr_accessor :mxn
|
1257
1331
|
# Tipping configuration for MYR
|
1258
1332
|
attr_accessor :myr
|
1259
1333
|
# Tipping configuration for NOK
|
@@ -1284,6 +1358,7 @@ module Stripe
|
|
1284
1358
|
hkd: nil,
|
1285
1359
|
huf: nil,
|
1286
1360
|
jpy: nil,
|
1361
|
+
mxn: nil,
|
1287
1362
|
myr: nil,
|
1288
1363
|
nok: nil,
|
1289
1364
|
nzd: nil,
|
@@ -1305,6 +1380,7 @@ module Stripe
|
|
1305
1380
|
@hkd = hkd
|
1306
1381
|
@huf = huf
|
1307
1382
|
@jpy = jpy
|
1383
|
+
@mxn = mxn
|
1308
1384
|
@myr = myr
|
1309
1385
|
@nok = nok
|
1310
1386
|
@nzd = nzd
|
@@ -1411,6 +1487,8 @@ module Stripe
|
|
1411
1487
|
attr_accessor :name
|
1412
1488
|
# Configurations for collecting transactions offline.
|
1413
1489
|
attr_accessor :offline
|
1490
|
+
# Configurations for reader security settings.
|
1491
|
+
attr_accessor :reader_security
|
1414
1492
|
# Reboot time settings for readers that support customized reboot time configuration.
|
1415
1493
|
attr_accessor :reboot_window
|
1416
1494
|
# An object containing device type specific settings for Stripe S700 readers
|
@@ -1427,6 +1505,7 @@ module Stripe
|
|
1427
1505
|
expand: nil,
|
1428
1506
|
name: nil,
|
1429
1507
|
offline: nil,
|
1508
|
+
reader_security: nil,
|
1430
1509
|
reboot_window: nil,
|
1431
1510
|
stripe_s700: nil,
|
1432
1511
|
tipping: nil,
|
@@ -1437,6 +1516,7 @@ module Stripe
|
|
1437
1516
|
@expand = expand
|
1438
1517
|
@name = name
|
1439
1518
|
@offline = offline
|
1519
|
+
@reader_security = reader_security
|
1440
1520
|
@reboot_window = reboot_window
|
1441
1521
|
@stripe_s700 = stripe_s700
|
1442
1522
|
@tipping = tipping
|
@@ -1458,6 +1538,8 @@ module Stripe
|
|
1458
1538
|
attr_reader :object
|
1459
1539
|
# Attribute for field offline
|
1460
1540
|
attr_reader :offline
|
1541
|
+
# Attribute for field reader_security
|
1542
|
+
attr_reader :reader_security
|
1461
1543
|
# Attribute for field reboot_window
|
1462
1544
|
attr_reader :reboot_window
|
1463
1545
|
# Attribute for field stripe_s700
|
@@ -682,6 +682,24 @@ module Stripe
|
|
682
682
|
end
|
683
683
|
|
684
684
|
class PresentPaymentMethodParams < Stripe::RequestParams
|
685
|
+
class Card < Stripe::RequestParams
|
686
|
+
# Card security code.
|
687
|
+
attr_accessor :cvc
|
688
|
+
# Two-digit number representing the card's expiration month.
|
689
|
+
attr_accessor :exp_month
|
690
|
+
# Two- or four-digit number representing the card's expiration year.
|
691
|
+
attr_accessor :exp_year
|
692
|
+
# The card number, as a string without any separators.
|
693
|
+
attr_accessor :number
|
694
|
+
|
695
|
+
def initialize(cvc: nil, exp_month: nil, exp_year: nil, number: nil)
|
696
|
+
@cvc = cvc
|
697
|
+
@exp_month = exp_month
|
698
|
+
@exp_year = exp_year
|
699
|
+
@number = number
|
700
|
+
end
|
701
|
+
end
|
702
|
+
|
685
703
|
class CardPresent < Stripe::RequestParams
|
686
704
|
# The card number, as a string without any separators.
|
687
705
|
attr_accessor :number
|
@@ -701,6 +719,8 @@ module Stripe
|
|
701
719
|
end
|
702
720
|
# Simulated on-reader tip amount.
|
703
721
|
attr_accessor :amount_tip
|
722
|
+
# Simulated data for the card payment method.
|
723
|
+
attr_accessor :card
|
704
724
|
# Simulated data for the card_present payment method.
|
705
725
|
attr_accessor :card_present
|
706
726
|
# Specifies which fields in the response should be expanded.
|
@@ -712,12 +732,14 @@ module Stripe
|
|
712
732
|
|
713
733
|
def initialize(
|
714
734
|
amount_tip: nil,
|
735
|
+
card: nil,
|
715
736
|
card_present: nil,
|
716
737
|
expand: nil,
|
717
738
|
interac_present: nil,
|
718
739
|
type: nil
|
719
740
|
)
|
720
741
|
@amount_tip = amount_tip
|
742
|
+
@card = card
|
721
743
|
@card_present = card_present
|
722
744
|
@expand = expand
|
723
745
|
@interac_present = interac_present
|
@@ -0,0 +1,62 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
module V2
|
6
|
+
module Billing
|
7
|
+
# BillSetting is responsible for settings which dictate generating bills, which include settings for calculating totals on bills, tax on bill items, as well as how to generate and present invoices.
|
8
|
+
class BillSetting < APIResource
|
9
|
+
OBJECT_NAME = "v2.billing.bill_setting"
|
10
|
+
def self.object_name
|
11
|
+
"v2.billing.bill_setting"
|
12
|
+
end
|
13
|
+
|
14
|
+
class Calculation < Stripe::StripeObject
|
15
|
+
class Tax < Stripe::StripeObject
|
16
|
+
# Determines if tax will be calculated automatically based on a PTC or manually based on rules defined by the merchant. Defaults to "manual".
|
17
|
+
attr_reader :type
|
18
|
+
end
|
19
|
+
# Settings for calculating tax.
|
20
|
+
attr_reader :tax
|
21
|
+
end
|
22
|
+
|
23
|
+
class Invoice < Stripe::StripeObject
|
24
|
+
class TimeUntilDue < Stripe::StripeObject
|
25
|
+
# The interval unit for the time until due.
|
26
|
+
attr_reader :interval
|
27
|
+
# The number of interval units. For example, if interval=day and interval_count=30,
|
28
|
+
# the invoice will be due in 30 days.
|
29
|
+
attr_reader :interval_count
|
30
|
+
end
|
31
|
+
# The amount of time until the invoice will be overdue for payment.
|
32
|
+
attr_reader :time_until_due
|
33
|
+
end
|
34
|
+
# Settings related to calculating a bill.
|
35
|
+
attr_reader :calculation
|
36
|
+
# Timestamp of when the object was created.
|
37
|
+
attr_reader :created
|
38
|
+
# An optional field for adding a display name for the BillSetting object.
|
39
|
+
attr_reader :display_name
|
40
|
+
# The ID of the BillSetting object.
|
41
|
+
attr_reader :id
|
42
|
+
# Settings related to invoice behavior.
|
43
|
+
attr_reader :invoice
|
44
|
+
# The ID of the invoice rendering template to be used when generating invoices.
|
45
|
+
attr_reader :invoice_rendering_template
|
46
|
+
# The latest version of the current settings object. This will be
|
47
|
+
# Updated every time an attribute of the settings is updated.
|
48
|
+
attr_reader :latest_version
|
49
|
+
# The current live version of the settings object. This can be different from
|
50
|
+
# latest_version if settings are updated without setting live_version='latest'.
|
51
|
+
attr_reader :live_version
|
52
|
+
# A lookup key used to retrieve settings dynamically from a static string.
|
53
|
+
# This may be up to 200 characters.
|
54
|
+
attr_reader :lookup_key
|
55
|
+
# String representing the object's type. Objects of the same type share the same value of the object field.
|
56
|
+
attr_reader :object
|
57
|
+
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
58
|
+
attr_reader :livemode
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# File generated from our OpenAPI spec
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Stripe
|
5
|
+
module V2
|
6
|
+
module Billing
|
7
|
+
class BillSettingVersion < APIResource
|
8
|
+
OBJECT_NAME = "v2.billing.bill_setting_version"
|
9
|
+
def self.object_name
|
10
|
+
"v2.billing.bill_setting_version"
|
11
|
+
end
|
12
|
+
|
13
|
+
class Calculation < Stripe::StripeObject
|
14
|
+
class Tax < Stripe::StripeObject
|
15
|
+
# Determines if tax will be calculated automatically based on a PTC or manually based on rules defined by the merchant. Defaults to "manual".
|
16
|
+
attr_reader :type
|
17
|
+
end
|
18
|
+
# Settings for calculating tax.
|
19
|
+
attr_reader :tax
|
20
|
+
end
|
21
|
+
|
22
|
+
class Invoice < Stripe::StripeObject
|
23
|
+
class TimeUntilDue < Stripe::StripeObject
|
24
|
+
# The interval unit for the time until due.
|
25
|
+
attr_reader :interval
|
26
|
+
# The number of interval units. For example, if interval=day and interval_count=30,
|
27
|
+
# the invoice will be due in 30 days.
|
28
|
+
attr_reader :interval_count
|
29
|
+
end
|
30
|
+
# The amount of time until the invoice will be overdue for payment.
|
31
|
+
attr_reader :time_until_due
|
32
|
+
end
|
33
|
+
# Settings related to calculating a bill.
|
34
|
+
attr_reader :calculation
|
35
|
+
# Timestamp of when the object was created.
|
36
|
+
attr_reader :created
|
37
|
+
# The ID of the BillSettingVersion object.
|
38
|
+
attr_reader :id
|
39
|
+
# Settings related to invoice behavior.
|
40
|
+
attr_reader :invoice
|
41
|
+
# The ID of the invoice rendering template to be used when generating invoices.
|
42
|
+
attr_reader :invoice_rendering_template
|
43
|
+
# String representing the object's type. Objects of the same type share the same value of the object field.
|
44
|
+
attr_reader :object
|
45
|
+
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
46
|
+
attr_reader :livemode
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|