stripe 13.3.0.pre.beta.1 → 13.3.0.pre.beta.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/OPENAPI_VERSION +1 -1
- data/VERSION +1 -1
- data/lib/stripe/object_types.rb +10 -0
- data/lib/stripe/resources/account.rb +230 -0
- data/lib/stripe/resources/account_link.rb +9 -0
- data/lib/stripe/resources/account_notice.rb +28 -0
- data/lib/stripe/resources/account_session.rb +103 -0
- data/lib/stripe/resources/apple_pay_domain.rb +13 -0
- data/lib/stripe/resources/application.rb +20 -0
- data/lib/stripe/resources/application_fee.rb +34 -0
- data/lib/stripe/resources/application_fee_refund.rb +17 -0
- data/lib/stripe/resources/apps/secret.rb +22 -0
- data/lib/stripe/resources/balance.rb +59 -0
- data/lib/stripe/resources/balance_transaction.rb +34 -0
- data/lib/stripe/resources/bank_account.rb +60 -2
- data/lib/stripe/resources/billing/alert.rb +21 -0
- data/lib/stripe/resources/billing/alert_triggered.rb +26 -0
- data/lib/stripe/resources/billing/credit_balance_summary.rb +25 -0
- data/lib/stripe/resources/billing/credit_balance_transaction.rb +45 -1
- data/lib/stripe/resources/billing/credit_grant.rb +46 -2
- data/lib/stripe/resources/billing/meter.rb +49 -7
- data/lib/stripe/resources/billing/meter_error_report.rb +44 -0
- data/lib/stripe/resources/billing/meter_event.rb +17 -3
- data/lib/stripe/resources/billing/meter_event_adjustment.rb +17 -1
- data/lib/stripe/resources/billing/meter_event_summary.rb +15 -0
- data/lib/stripe/resources/billing_portal/configuration.rb +70 -0
- data/lib/stripe/resources/billing_portal/session.rb +61 -0
- data/lib/stripe/resources/capability.rb +38 -0
- data/lib/stripe/resources/capital/financing_offer.rb +45 -0
- data/lib/stripe/resources/capital/financing_summary.rb +17 -0
- data/lib/stripe/resources/capital/financing_transaction.rb +29 -0
- data/lib/stripe/resources/card.rb +72 -0
- data/lib/stripe/resources/cash_balance.rb +14 -0
- data/lib/stripe/resources/charge.rb +469 -0
- data/lib/stripe/resources/checkout/session.rb +496 -0
- data/lib/stripe/resources/climate/order.rb +55 -0
- data/lib/stripe/resources/climate/product.rb +24 -0
- data/lib/stripe/resources/climate/supplier.rb +18 -0
- data/lib/stripe/resources/confirmation_token.rb +297 -0
- data/lib/stripe/resources/connect_collection_transfer.rb +24 -0
- data/lib/stripe/resources/country_spec.rb +27 -0
- data/lib/stripe/resources/coupon.rb +44 -0
- data/lib/stripe/resources/credit_note.rb +91 -0
- data/lib/stripe/resources/credit_note_line_item.rb +46 -0
- data/lib/stripe/resources/customer.rb +93 -0
- data/lib/stripe/resources/customer_balance_transaction.rb +27 -0
- data/lib/stripe/resources/customer_cash_balance_transaction.rb +72 -0
- data/lib/stripe/resources/customer_session.rb +34 -0
- data/lib/stripe/resources/discount.rb +29 -0
- data/lib/stripe/resources/dispute.rb +88 -0
- data/lib/stripe/resources/entitlements/active_entitlement.rb +11 -0
- data/lib/stripe/resources/entitlements/active_entitlement_summary.rb +23 -0
- data/lib/stripe/resources/entitlements/feature.rb +15 -0
- data/lib/stripe/resources/ephemeral_key.rb +13 -0
- data/lib/stripe/resources/event.rb +44 -0
- data/lib/stripe/resources/exchange_rate.rb +7 -0
- data/lib/stripe/resources/file.rb +23 -0
- data/lib/stripe/resources/file_link.rb +19 -0
- data/lib/stripe/resources/financial_connections/account.rb +84 -0
- data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +13 -0
- data/lib/stripe/resources/financial_connections/account_owner.rb +17 -0
- data/lib/stripe/resources/financial_connections/account_ownership.rb +9 -0
- data/lib/stripe/resources/financial_connections/institution.rb +35 -0
- data/lib/stripe/resources/financial_connections/session.rb +49 -0
- data/lib/stripe/resources/financial_connections/transaction.rb +28 -0
- data/lib/stripe/resources/forwarding/request.rb +40 -0
- data/lib/stripe/resources/funding_instructions.rb +82 -0
- data/lib/stripe/resources/gift_cards/card.rb +37 -0
- data/lib/stripe/resources/gift_cards/transaction.rb +39 -0
- data/lib/stripe/resources/identity/verification_report.rb +92 -0
- data/lib/stripe/resources/identity/verification_session.rb +76 -0
- data/lib/stripe/resources/invoice.rb +337 -0
- data/lib/stripe/resources/invoice_item.rb +54 -0
- data/lib/stripe/resources/invoice_line_item.rb +83 -0
- data/lib/stripe/resources/invoice_payment.rb +34 -0
- data/lib/stripe/resources/invoice_rendering_template.rb +17 -0
- data/lib/stripe/resources/issuing/authorization.rb +129 -0
- data/lib/stripe/resources/issuing/card.rb +86 -0
- data/lib/stripe/resources/issuing/cardholder.rb +76 -0
- data/lib/stripe/resources/issuing/credit_underwriting_record.rb +57 -0
- data/lib/stripe/resources/issuing/dispute.rb +65 -0
- data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +23 -0
- data/lib/stripe/resources/issuing/fraud_liability_debit.rb +17 -0
- data/lib/stripe/resources/issuing/personalization_design.rb +38 -0
- data/lib/stripe/resources/issuing/physical_bundle.rb +18 -0
- data/lib/stripe/resources/issuing/settlement.rb +49 -0
- data/lib/stripe/resources/issuing/token.rb +46 -0
- data/lib/stripe/resources/issuing/transaction.rb +106 -0
- data/lib/stripe/resources/line_item.rb +50 -0
- data/lib/stripe/resources/login_link.rb +7 -0
- data/lib/stripe/resources/mandate.rb +78 -0
- data/lib/stripe/resources/margin.rb +19 -0
- data/lib/stripe/resources/order.rb +202 -0
- data/lib/stripe/resources/payment_attempt_record.rb +73 -0
- data/lib/stripe/resources/payment_intent.rb +642 -0
- data/lib/stripe/resources/payment_link.rb +198 -0
- data/lib/stripe/resources/payment_method.rb +368 -0
- data/lib/stripe/resources/payment_method_configuration.rb +430 -0
- data/lib/stripe/resources/payment_method_domain.rb +57 -0
- data/lib/stripe/resources/payment_record.rb +79 -0
- data/lib/stripe/resources/payout.rb +56 -0
- data/lib/stripe/resources/person.rb +128 -0
- data/lib/stripe/resources/plan.rb +52 -0
- data/lib/stripe/resources/price.rb +77 -0
- data/lib/stripe/resources/product.rb +60 -0
- data/lib/stripe/resources/product_feature.rb +12 -0
- data/lib/stripe/resources/promotion_code.rb +35 -0
- data/lib/stripe/resources/quote.rb +252 -0
- data/lib/stripe/resources/quote_line.rb +136 -0
- data/lib/stripe/resources/quote_preview_invoice.rb +331 -0
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +159 -0
- data/lib/stripe/resources/radar/early_fraud_warning.rb +17 -0
- data/lib/stripe/resources/radar/value_list.rb +23 -0
- data/lib/stripe/resources/radar/value_list_item.rb +17 -0
- data/lib/stripe/resources/refund.rb +130 -0
- data/lib/stripe/resources/reporting/report_run.rb +29 -0
- data/lib/stripe/resources/reporting/report_type.rb +19 -0
- data/lib/stripe/resources/reserve_transaction.rb +22 -0
- data/lib/stripe/resources/reversal.rb +21 -0
- data/lib/stripe/resources/review.rb +36 -0
- data/lib/stripe/resources/setup_attempt.rb +101 -0
- data/lib/stripe/resources/setup_intent.rb +158 -0
- data/lib/stripe/resources/shipping_rate.rb +42 -0
- data/lib/stripe/resources/sigma/scheduled_query_run.rb +26 -0
- data/lib/stripe/resources/source.rb +195 -0
- data/lib/stripe/resources/source_mandate_notification.rb +59 -0
- data/lib/stripe/resources/source_transaction.rb +48 -0
- data/lib/stripe/resources/subscription.rb +214 -0
- data/lib/stripe/resources/subscription_item.rb +46 -0
- data/lib/stripe/resources/subscription_schedule.rb +153 -0
- data/lib/stripe/resources/tax/association.rb +36 -0
- data/lib/stripe/resources/tax/calculation.rb +72 -0
- data/lib/stripe/resources/tax/calculation_line_item.rb +33 -0
- data/lib/stripe/resources/tax/form.rb +75 -0
- data/lib/stripe/resources/tax/registration.rb +379 -0
- data/lib/stripe/resources/tax/settings.rb +33 -0
- data/lib/stripe/resources/tax/transaction.rb +68 -0
- data/lib/stripe/resources/tax/transaction_line_item.rb +30 -0
- data/lib/stripe/resources/tax_code.rb +9 -0
- data/lib/stripe/resources/tax_deducted_at_source.rb +22 -0
- data/lib/stripe/resources/tax_id.rb +30 -0
- data/lib/stripe/resources/tax_rate.rb +42 -0
- data/lib/stripe/resources/terminal/configuration.rb +107 -0
- data/lib/stripe/resources/terminal/connection_token.rb +7 -0
- data/lib/stripe/resources/terminal/location.rb +20 -0
- data/lib/stripe/resources/terminal/reader.rb +118 -0
- data/lib/stripe/resources/terminal/reader_collected_data.rb +16 -0
- data/lib/stripe/resources/test_helpers/test_clock.rb +27 -0
- data/lib/stripe/resources/token.rb +29 -0
- data/lib/stripe/resources/topup.rb +33 -0
- data/lib/stripe/resources/transfer.rb +35 -0
- data/lib/stripe/resources/treasury/credit_reversal.rb +32 -0
- data/lib/stripe/resources/treasury/debit_reversal.rb +38 -0
- data/lib/stripe/resources/treasury/financial_account.rb +57 -0
- data/lib/stripe/resources/treasury/financial_account_features.rb +91 -0
- data/lib/stripe/resources/treasury/inbound_transfer.rb +66 -0
- data/lib/stripe/resources/treasury/outbound_payment.rb +85 -0
- data/lib/stripe/resources/treasury/outbound_transfer.rb +82 -0
- data/lib/stripe/resources/treasury/received_credit.rb +70 -0
- data/lib/stripe/resources/treasury/received_debit.rb +67 -0
- data/lib/stripe/resources/treasury/transaction.rb +42 -0
- data/lib/stripe/resources/treasury/transaction_entry.rb +34 -0
- data/lib/stripe/resources/usage_record.rb +13 -0
- data/lib/stripe/resources/usage_record_summary.rb +18 -0
- data/lib/stripe/resources/v2/amount.rb +9 -0
- data/lib/stripe/resources/v2/billing/meter_event.rb +18 -0
- data/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +20 -0
- data/lib/stripe/resources/v2/billing/meter_event_session.rb +14 -0
- data/lib/stripe/resources/v2/event.rb +21 -0
- data/lib/stripe/resources/v2/event_destination.rb +49 -0
- data/lib/stripe/resources/webhook_endpoint.rb +27 -0
- data/lib/stripe/resources.rb +10 -0
- data/lib/stripe/services/billing/credit_balance_summary_service.rb +1 -1
- data/lib/stripe/services/billing/credit_balance_transaction_service.rb +2 -2
- data/lib/stripe/services/billing/credit_grant_service.rb +3 -3
- data/lib/stripe/services/billing/meter_event_adjustment_service.rb +1 -1
- data/lib/stripe/services/billing/meter_event_service.rb +1 -1
- data/lib/stripe/services/billing/meter_service.rb +5 -5
- data/lib/stripe/stripe_object.rb +5 -0
- data/lib/stripe/version.rb +1 -1
- data/stripe.gemspec +2 -1
- metadata +13 -2
@@ -15,6 +15,134 @@ module Stripe
|
|
15
15
|
"person"
|
16
16
|
end
|
17
17
|
|
18
|
+
class AdditionalTosAcceptances < Stripe::StripeObject
|
19
|
+
class Account < Stripe::StripeObject
|
20
|
+
attr_reader :date, :ip, :user_agent
|
21
|
+
end
|
22
|
+
attr_reader :account
|
23
|
+
end
|
24
|
+
|
25
|
+
class Address < Stripe::StripeObject
|
26
|
+
attr_reader :city, :country, :line1, :line2, :postal_code, :state
|
27
|
+
end
|
28
|
+
|
29
|
+
class AddressKana < Stripe::StripeObject
|
30
|
+
attr_reader :city, :country, :line1, :line2, :postal_code, :state, :town
|
31
|
+
end
|
32
|
+
|
33
|
+
class AddressKanji < Stripe::StripeObject
|
34
|
+
attr_reader :city, :country, :line1, :line2, :postal_code, :state, :town
|
35
|
+
end
|
36
|
+
|
37
|
+
class Dob < Stripe::StripeObject
|
38
|
+
attr_reader :day, :month, :year
|
39
|
+
end
|
40
|
+
|
41
|
+
class FutureRequirements < Stripe::StripeObject
|
42
|
+
class Alternative < Stripe::StripeObject
|
43
|
+
attr_reader :alternative_fields_due, :original_fields_due
|
44
|
+
end
|
45
|
+
|
46
|
+
class Error < Stripe::StripeObject
|
47
|
+
attr_reader :code, :reason, :requirement
|
48
|
+
end
|
49
|
+
attr_reader :alternatives, :currently_due, :errors, :eventually_due, :past_due, :pending_verification
|
50
|
+
end
|
51
|
+
|
52
|
+
class RegisteredAddress < Stripe::StripeObject
|
53
|
+
attr_reader :city, :country, :line1, :line2, :postal_code, :state
|
54
|
+
end
|
55
|
+
|
56
|
+
class Relationship < Stripe::StripeObject
|
57
|
+
attr_reader :authorizer, :director, :executive, :legal_guardian, :owner, :percent_ownership, :representative, :title
|
58
|
+
end
|
59
|
+
|
60
|
+
class Requirements < Stripe::StripeObject
|
61
|
+
class Alternative < Stripe::StripeObject
|
62
|
+
attr_reader :alternative_fields_due, :original_fields_due
|
63
|
+
end
|
64
|
+
|
65
|
+
class Error < Stripe::StripeObject
|
66
|
+
attr_reader :code, :reason, :requirement
|
67
|
+
end
|
68
|
+
attr_reader :alternatives, :currently_due, :errors, :eventually_due, :past_due, :pending_verification
|
69
|
+
end
|
70
|
+
|
71
|
+
class Verification < Stripe::StripeObject
|
72
|
+
class AdditionalDocument < Stripe::StripeObject
|
73
|
+
attr_reader :back, :details, :details_code, :front
|
74
|
+
end
|
75
|
+
|
76
|
+
class Document < Stripe::StripeObject
|
77
|
+
attr_reader :back, :details, :details_code, :front
|
78
|
+
end
|
79
|
+
attr_reader :additional_document, :details, :details_code, :document, :status
|
80
|
+
end
|
81
|
+
# The account the person is associated with.
|
82
|
+
attr_reader :account
|
83
|
+
# Attribute for field additional_tos_acceptances
|
84
|
+
attr_reader :additional_tos_acceptances
|
85
|
+
# Attribute for field address
|
86
|
+
attr_reader :address
|
87
|
+
# The Kana variation of the person's address (Japan only).
|
88
|
+
attr_reader :address_kana
|
89
|
+
# The Kanji variation of the person's address (Japan only).
|
90
|
+
attr_reader :address_kanji
|
91
|
+
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
92
|
+
attr_reader :created
|
93
|
+
# Attribute for field dob
|
94
|
+
attr_reader :dob
|
95
|
+
# The person's email address.
|
96
|
+
attr_reader :email
|
97
|
+
# The person's first name.
|
98
|
+
attr_reader :first_name
|
99
|
+
# The Kana variation of the person's first name (Japan only).
|
100
|
+
attr_reader :first_name_kana
|
101
|
+
# The Kanji variation of the person's first name (Japan only).
|
102
|
+
attr_reader :first_name_kanji
|
103
|
+
# A list of alternate names or aliases that the person is known by.
|
104
|
+
attr_reader :full_name_aliases
|
105
|
+
# Information about the [upcoming new requirements for this person](https://stripe.com/docs/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when.
|
106
|
+
attr_reader :future_requirements
|
107
|
+
# The person's gender.
|
108
|
+
attr_reader :gender
|
109
|
+
# Unique identifier for the object.
|
110
|
+
attr_reader :id
|
111
|
+
# Whether the person's `id_number` was provided. True if either the full ID number was provided or if only the required part of the ID number was provided (ex. last four of an individual's SSN for the US indicated by `ssn_last_4_provided`).
|
112
|
+
attr_reader :id_number_provided
|
113
|
+
# Whether the person's `id_number_secondary` was provided.
|
114
|
+
attr_reader :id_number_secondary_provided
|
115
|
+
# The person's last name.
|
116
|
+
attr_reader :last_name
|
117
|
+
# The Kana variation of the person's last name (Japan only).
|
118
|
+
attr_reader :last_name_kana
|
119
|
+
# The Kanji variation of the person's last name (Japan only).
|
120
|
+
attr_reader :last_name_kanji
|
121
|
+
# The person's maiden name.
|
122
|
+
attr_reader :maiden_name
|
123
|
+
# 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.
|
124
|
+
attr_reader :metadata
|
125
|
+
# The country where the person is a national.
|
126
|
+
attr_reader :nationality
|
127
|
+
# String representing the object's type. Objects of the same type share the same value.
|
128
|
+
attr_reader :object
|
129
|
+
# The person's phone number.
|
130
|
+
attr_reader :phone
|
131
|
+
# Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
|
132
|
+
attr_reader :political_exposure
|
133
|
+
# Attribute for field registered_address
|
134
|
+
attr_reader :registered_address
|
135
|
+
# Attribute for field relationship
|
136
|
+
attr_reader :relationship
|
137
|
+
# Information about the requirements for this person, including what information needs to be collected, and by when.
|
138
|
+
attr_reader :requirements
|
139
|
+
# Whether the last four digits of the person's Social Security number have been provided (U.S. only).
|
140
|
+
attr_reader :ssn_last_4_provided
|
141
|
+
# Attribute for field verification
|
142
|
+
attr_reader :verification
|
143
|
+
# Always true for a deleted object
|
144
|
+
attr_reader :deleted
|
145
|
+
|
18
146
|
def resource_url
|
19
147
|
if !respond_to?(:account) || account.nil?
|
20
148
|
raise NotImplementedError,
|
@@ -21,6 +21,58 @@ module Stripe
|
|
21
21
|
"plan"
|
22
22
|
end
|
23
23
|
|
24
|
+
class Tier < Stripe::StripeObject
|
25
|
+
attr_reader :flat_amount, :flat_amount_decimal, :unit_amount, :unit_amount_decimal, :up_to
|
26
|
+
end
|
27
|
+
|
28
|
+
class TransformUsage < Stripe::StripeObject
|
29
|
+
attr_reader :divide_by, :round
|
30
|
+
end
|
31
|
+
# Whether the plan can be used for new purchases.
|
32
|
+
attr_reader :active
|
33
|
+
# Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`.
|
34
|
+
attr_reader :aggregate_usage
|
35
|
+
# The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`.
|
36
|
+
attr_reader :amount
|
37
|
+
# The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`.
|
38
|
+
attr_reader :amount_decimal
|
39
|
+
# Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes.
|
40
|
+
attr_reader :billing_scheme
|
41
|
+
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
42
|
+
attr_reader :created
|
43
|
+
# 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).
|
44
|
+
attr_reader :currency
|
45
|
+
# Unique identifier for the object.
|
46
|
+
attr_reader :id
|
47
|
+
# The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`.
|
48
|
+
attr_reader :interval
|
49
|
+
# The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months.
|
50
|
+
attr_reader :interval_count
|
51
|
+
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
52
|
+
attr_reader :livemode
|
53
|
+
# 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.
|
54
|
+
attr_reader :metadata
|
55
|
+
# The meter tracking the usage of a metered price
|
56
|
+
attr_reader :meter
|
57
|
+
# A brief description of the plan, hidden from customers.
|
58
|
+
attr_reader :nickname
|
59
|
+
# String representing the object's type. Objects of the same type share the same value.
|
60
|
+
attr_reader :object
|
61
|
+
# The product whose pricing this plan determines.
|
62
|
+
attr_reader :product
|
63
|
+
# Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
|
64
|
+
attr_reader :tiers
|
65
|
+
# Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows.
|
66
|
+
attr_reader :tiers_mode
|
67
|
+
# Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`.
|
68
|
+
attr_reader :transform_usage
|
69
|
+
# Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan).
|
70
|
+
attr_reader :trial_period_days
|
71
|
+
# Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`.
|
72
|
+
attr_reader :usage_type
|
73
|
+
# Always true for a deleted object
|
74
|
+
attr_reader :deleted
|
75
|
+
|
24
76
|
# You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration.
|
25
77
|
def self.create(params = {}, opts = {})
|
26
78
|
request_stripe_object(method: :post, path: "/v1/plans", params: params, opts: opts)
|
@@ -19,6 +19,83 @@ module Stripe
|
|
19
19
|
"price"
|
20
20
|
end
|
21
21
|
|
22
|
+
class CurrencyOptions < Stripe::StripeObject
|
23
|
+
class CustomUnitAmount < Stripe::StripeObject
|
24
|
+
attr_reader :maximum, :minimum, :preset
|
25
|
+
end
|
26
|
+
|
27
|
+
class Tier < Stripe::StripeObject
|
28
|
+
attr_reader :flat_amount, :flat_amount_decimal, :unit_amount, :unit_amount_decimal, :up_to
|
29
|
+
end
|
30
|
+
attr_reader :custom_unit_amount, :tax_behavior, :tiers, :unit_amount, :unit_amount_decimal
|
31
|
+
end
|
32
|
+
|
33
|
+
class CustomUnitAmount < Stripe::StripeObject
|
34
|
+
attr_reader :maximum, :minimum, :preset
|
35
|
+
end
|
36
|
+
|
37
|
+
class MigrateTo < Stripe::StripeObject
|
38
|
+
attr_reader :behavior, :effective_after, :price
|
39
|
+
end
|
40
|
+
|
41
|
+
class Recurring < Stripe::StripeObject
|
42
|
+
attr_reader :aggregate_usage, :interval, :interval_count, :meter, :trial_period_days, :usage_type
|
43
|
+
end
|
44
|
+
|
45
|
+
class Tier < Stripe::StripeObject
|
46
|
+
attr_reader :flat_amount, :flat_amount_decimal, :unit_amount, :unit_amount_decimal, :up_to
|
47
|
+
end
|
48
|
+
|
49
|
+
class TransformQuantity < Stripe::StripeObject
|
50
|
+
attr_reader :divide_by, :round
|
51
|
+
end
|
52
|
+
# Whether the price can be used for new purchases.
|
53
|
+
attr_reader :active
|
54
|
+
# Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes.
|
55
|
+
attr_reader :billing_scheme
|
56
|
+
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
57
|
+
attr_reader :created
|
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).
|
59
|
+
attr_reader :currency
|
60
|
+
# Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
|
61
|
+
attr_reader :currency_options
|
62
|
+
# When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.
|
63
|
+
attr_reader :custom_unit_amount
|
64
|
+
# Unique identifier for the object.
|
65
|
+
attr_reader :id
|
66
|
+
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
67
|
+
attr_reader :livemode
|
68
|
+
# A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters.
|
69
|
+
attr_reader :lookup_key
|
70
|
+
# 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.
|
71
|
+
attr_reader :metadata
|
72
|
+
# Subscriptions using this price will be migrated to use the new referenced price.
|
73
|
+
attr_reader :migrate_to
|
74
|
+
# A brief description of the price, hidden from customers.
|
75
|
+
attr_reader :nickname
|
76
|
+
# String representing the object's type. Objects of the same type share the same value.
|
77
|
+
attr_reader :object
|
78
|
+
# The ID of the product this price is associated with.
|
79
|
+
attr_reader :product
|
80
|
+
# The recurring components of a price such as `interval` and `usage_type`.
|
81
|
+
attr_reader :recurring
|
82
|
+
# Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
|
83
|
+
attr_reader :tax_behavior
|
84
|
+
# Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`.
|
85
|
+
attr_reader :tiers
|
86
|
+
# Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows.
|
87
|
+
attr_reader :tiers_mode
|
88
|
+
# Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`.
|
89
|
+
attr_reader :transform_quantity
|
90
|
+
# One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
|
91
|
+
attr_reader :type
|
92
|
+
# The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`.
|
93
|
+
attr_reader :unit_amount
|
94
|
+
# The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`.
|
95
|
+
attr_reader :unit_amount_decimal
|
96
|
+
# Always true for a deleted object
|
97
|
+
attr_reader :deleted
|
98
|
+
|
22
99
|
# Creates a new price for an existing product. The price can be recurring or one-time.
|
23
100
|
def self.create(params = {}, opts = {})
|
24
101
|
request_stripe_object(method: :post, path: "/v1/prices", params: params, opts: opts)
|
@@ -25,6 +25,66 @@ module Stripe
|
|
25
25
|
|
26
26
|
nested_resource_class_methods :feature, operations: %i[create retrieve delete list]
|
27
27
|
|
28
|
+
class MarketingFeature < Stripe::StripeObject
|
29
|
+
attr_reader :name
|
30
|
+
end
|
31
|
+
|
32
|
+
class PackageDimensions < Stripe::StripeObject
|
33
|
+
attr_reader :height, :length, :weight, :width
|
34
|
+
end
|
35
|
+
|
36
|
+
class Provisioning < Stripe::StripeObject
|
37
|
+
class GiftCard < Stripe::StripeObject
|
38
|
+
class FixedAmount < Stripe::StripeObject
|
39
|
+
attr_reader :amount, :currency
|
40
|
+
end
|
41
|
+
attr_reader :fixed_amount, :type
|
42
|
+
end
|
43
|
+
attr_reader :gift_card, :type
|
44
|
+
end
|
45
|
+
# Whether the product is currently available for purchase.
|
46
|
+
attr_reader :active
|
47
|
+
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
48
|
+
attr_reader :created
|
49
|
+
# The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product.
|
50
|
+
attr_reader :default_price
|
51
|
+
# The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
|
52
|
+
attr_reader :description
|
53
|
+
# Unique identifier for the object.
|
54
|
+
attr_reader :id
|
55
|
+
# A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
|
56
|
+
attr_reader :images
|
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
|
+
# A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table).
|
60
|
+
attr_reader :marketing_features
|
61
|
+
# 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.
|
62
|
+
attr_reader :metadata
|
63
|
+
# The product's name, meant to be displayable to the customer.
|
64
|
+
attr_reader :name
|
65
|
+
# String representing the object's type. Objects of the same type share the same value.
|
66
|
+
attr_reader :object
|
67
|
+
# The dimensions of this product for shipping purposes.
|
68
|
+
attr_reader :package_dimensions
|
69
|
+
# Provisioning configuration for this product.
|
70
|
+
attr_reader :provisioning
|
71
|
+
# Whether this product is shipped (i.e., physical goods).
|
72
|
+
attr_reader :shippable
|
73
|
+
# Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used. Only used for subscription payments.
|
74
|
+
attr_reader :statement_descriptor
|
75
|
+
# A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
|
76
|
+
attr_reader :tax_code
|
77
|
+
# The type of the product. The product is either of type `good`, which is eligible for use with Orders and SKUs, or `service`, which is eligible for use with Subscriptions and Plans.
|
78
|
+
attr_reader :type
|
79
|
+
# A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal.
|
80
|
+
attr_reader :unit_label
|
81
|
+
# Time at which the object was last updated. Measured in seconds since the Unix epoch.
|
82
|
+
attr_reader :updated
|
83
|
+
# A URL of a publicly-accessible webpage for this product.
|
84
|
+
attr_reader :url
|
85
|
+
# Always true for a deleted object
|
86
|
+
attr_reader :deleted
|
87
|
+
|
28
88
|
# Creates a new product object.
|
29
89
|
def self.create(params = {}, opts = {})
|
30
90
|
request_stripe_object(method: :post, path: "/v1/products", params: params, opts: opts)
|
@@ -9,5 +9,17 @@ module Stripe
|
|
9
9
|
def self.object_name
|
10
10
|
"product_feature"
|
11
11
|
end
|
12
|
+
|
13
|
+
# A feature represents a monetizable ability or functionality in your system.
|
14
|
+
# Features can be assigned to products, and when those products are purchased, Stripe will create an entitlement to the feature for the purchasing customer.
|
15
|
+
attr_reader :entitlement_feature
|
16
|
+
# Unique identifier for the object.
|
17
|
+
attr_reader :id
|
18
|
+
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
19
|
+
attr_reader :livemode
|
20
|
+
# String representing the object's type. Objects of the same type share the same value.
|
21
|
+
attr_reader :object
|
22
|
+
# Always true for a deleted object
|
23
|
+
attr_reader :deleted
|
12
24
|
end
|
13
25
|
end
|
@@ -14,6 +14,41 @@ module Stripe
|
|
14
14
|
"promotion_code"
|
15
15
|
end
|
16
16
|
|
17
|
+
class Restrictions < Stripe::StripeObject
|
18
|
+
class CurrencyOptions < Stripe::StripeObject
|
19
|
+
attr_reader :minimum_amount
|
20
|
+
end
|
21
|
+
attr_reader :currency_options, :first_time_transaction, :minimum_amount, :minimum_amount_currency
|
22
|
+
end
|
23
|
+
# Whether the promotion code is currently active. A promotion code is only active if the coupon is also valid.
|
24
|
+
attr_reader :active
|
25
|
+
# The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for each customer. Valid characters are lower case letters (a-z), upper case letters (A-Z), and digits (0-9).
|
26
|
+
attr_reader :code
|
27
|
+
# A coupon contains information about a percent-off or amount-off discount you
|
28
|
+
# might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices),
|
29
|
+
# [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents).
|
30
|
+
attr_reader :coupon
|
31
|
+
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
32
|
+
attr_reader :created
|
33
|
+
# The customer that this promotion code can be used by.
|
34
|
+
attr_reader :customer
|
35
|
+
# Date at which the promotion code can no longer be redeemed.
|
36
|
+
attr_reader :expires_at
|
37
|
+
# Unique identifier for the object.
|
38
|
+
attr_reader :id
|
39
|
+
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
40
|
+
attr_reader :livemode
|
41
|
+
# Maximum number of times this promotion code can be redeemed.
|
42
|
+
attr_reader :max_redemptions
|
43
|
+
# 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.
|
44
|
+
attr_reader :metadata
|
45
|
+
# String representing the object's type. Objects of the same type share the same value.
|
46
|
+
attr_reader :object
|
47
|
+
# Attribute for field restrictions
|
48
|
+
attr_reader :restrictions
|
49
|
+
# Number of times this promotion code has been used.
|
50
|
+
attr_reader :times_redeemed
|
51
|
+
|
17
52
|
# A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.
|
18
53
|
def self.create(params = {}, opts = {})
|
19
54
|
request_stripe_object(method: :post, path: "/v1/promotion_codes", params: params, opts: opts)
|
@@ -18,6 +18,258 @@ module Stripe
|
|
18
18
|
nested_resource_class_methods :preview_invoice, operations: %i[list]
|
19
19
|
nested_resource_class_methods :preview_subscription_schedule, operations: %i[list]
|
20
20
|
|
21
|
+
class AutomaticTax < Stripe::StripeObject
|
22
|
+
class Liability < Stripe::StripeObject
|
23
|
+
attr_reader :account, :type
|
24
|
+
end
|
25
|
+
attr_reader :enabled, :liability, :status
|
26
|
+
end
|
27
|
+
|
28
|
+
class Computed < Stripe::StripeObject
|
29
|
+
class LastReestimationDetails < Stripe::StripeObject
|
30
|
+
class Failed < Stripe::StripeObject
|
31
|
+
attr_reader :failure_code, :message, :reason
|
32
|
+
end
|
33
|
+
attr_reader :failed, :status
|
34
|
+
end
|
35
|
+
|
36
|
+
class Recurring < Stripe::StripeObject
|
37
|
+
class TotalDetails < Stripe::StripeObject
|
38
|
+
class Breakdown < Stripe::StripeObject
|
39
|
+
class Discount < Stripe::StripeObject
|
40
|
+
attr_reader :amount, :discount
|
41
|
+
end
|
42
|
+
|
43
|
+
class Tax < Stripe::StripeObject
|
44
|
+
attr_reader :amount, :rate, :taxability_reason, :taxable_amount
|
45
|
+
end
|
46
|
+
attr_reader :discounts, :taxes
|
47
|
+
end
|
48
|
+
attr_reader :amount_discount, :amount_shipping, :amount_tax, :breakdown
|
49
|
+
end
|
50
|
+
attr_reader :amount_subtotal, :amount_total, :interval, :interval_count, :total_details
|
51
|
+
end
|
52
|
+
|
53
|
+
class Upfront < Stripe::StripeObject
|
54
|
+
class TotalDetails < Stripe::StripeObject
|
55
|
+
class Breakdown < Stripe::StripeObject
|
56
|
+
class Discount < Stripe::StripeObject
|
57
|
+
attr_reader :amount, :discount
|
58
|
+
end
|
59
|
+
|
60
|
+
class Tax < Stripe::StripeObject
|
61
|
+
attr_reader :amount, :rate, :taxability_reason, :taxable_amount
|
62
|
+
end
|
63
|
+
attr_reader :discounts, :taxes
|
64
|
+
end
|
65
|
+
attr_reader :amount_discount, :amount_shipping, :amount_tax, :breakdown
|
66
|
+
end
|
67
|
+
attr_reader :amount_subtotal, :amount_total, :line_items, :total_details
|
68
|
+
end
|
69
|
+
attr_reader :last_reestimation_details, :recurring, :updated_at, :upfront
|
70
|
+
end
|
71
|
+
|
72
|
+
class FromQuote < Stripe::StripeObject
|
73
|
+
attr_reader :is_revision, :quote
|
74
|
+
end
|
75
|
+
|
76
|
+
class InvoiceSettings < Stripe::StripeObject
|
77
|
+
class Issuer < Stripe::StripeObject
|
78
|
+
attr_reader :account, :type
|
79
|
+
end
|
80
|
+
attr_reader :days_until_due, :issuer
|
81
|
+
end
|
82
|
+
|
83
|
+
class StatusDetails < Stripe::StripeObject
|
84
|
+
class Canceled < Stripe::StripeObject
|
85
|
+
attr_reader :reason, :transitioned_at
|
86
|
+
end
|
87
|
+
|
88
|
+
class Stale < Stripe::StripeObject
|
89
|
+
class LastReason < Stripe::StripeObject
|
90
|
+
class LinesInvalid < Stripe::StripeObject
|
91
|
+
attr_reader :invalid_at, :lines
|
92
|
+
end
|
93
|
+
|
94
|
+
class SubscriptionChanged < Stripe::StripeObject
|
95
|
+
attr_reader :previous_subscription
|
96
|
+
end
|
97
|
+
|
98
|
+
class SubscriptionScheduleChanged < Stripe::StripeObject
|
99
|
+
attr_reader :previous_subscription_schedule
|
100
|
+
end
|
101
|
+
attr_reader :line_invalid, :lines_invalid, :marked_stale, :subscription_canceled, :subscription_changed, :subscription_expired, :subscription_schedule_canceled, :subscription_schedule_changed, :subscription_schedule_released, :type
|
102
|
+
end
|
103
|
+
attr_reader :expires_at, :last_reason, :last_updated_at, :transitioned_at
|
104
|
+
end
|
105
|
+
attr_reader :canceled, :stale
|
106
|
+
end
|
107
|
+
|
108
|
+
class StatusTransitions < Stripe::StripeObject
|
109
|
+
attr_reader :accepted_at, :canceled_at, :finalized_at
|
110
|
+
end
|
111
|
+
|
112
|
+
class SubscriptionData < Stripe::StripeObject
|
113
|
+
class BillOnAcceptance < Stripe::StripeObject
|
114
|
+
class BillFrom < Stripe::StripeObject
|
115
|
+
class LineStartsAt < Stripe::StripeObject
|
116
|
+
attr_reader :id
|
117
|
+
end
|
118
|
+
attr_reader :computed, :line_starts_at, :timestamp, :type
|
119
|
+
end
|
120
|
+
|
121
|
+
class BillUntil < Stripe::StripeObject
|
122
|
+
class Duration < Stripe::StripeObject
|
123
|
+
attr_reader :interval, :interval_count
|
124
|
+
end
|
125
|
+
|
126
|
+
class LineEndsAt < Stripe::StripeObject
|
127
|
+
attr_reader :id
|
128
|
+
end
|
129
|
+
attr_reader :computed, :duration, :line_ends_at, :timestamp, :type
|
130
|
+
end
|
131
|
+
attr_reader :bill_from, :bill_until
|
132
|
+
end
|
133
|
+
|
134
|
+
class Prebilling < Stripe::StripeObject
|
135
|
+
attr_reader :iterations
|
136
|
+
end
|
137
|
+
attr_reader :bill_on_acceptance, :billing_behavior, :billing_cycle_anchor, :description, :effective_date, :end_behavior, :from_subscription, :metadata, :prebilling, :proration_behavior, :trial_period_days
|
138
|
+
end
|
139
|
+
|
140
|
+
class SubscriptionDataOverride < Stripe::StripeObject
|
141
|
+
class AppliesTo < Stripe::StripeObject
|
142
|
+
attr_reader :new_reference, :subscription_schedule, :type
|
143
|
+
end
|
144
|
+
|
145
|
+
class BillOnAcceptance < Stripe::StripeObject
|
146
|
+
class BillFrom < Stripe::StripeObject
|
147
|
+
class LineStartsAt < Stripe::StripeObject
|
148
|
+
attr_reader :id
|
149
|
+
end
|
150
|
+
attr_reader :computed, :line_starts_at, :timestamp, :type
|
151
|
+
end
|
152
|
+
|
153
|
+
class BillUntil < Stripe::StripeObject
|
154
|
+
class Duration < Stripe::StripeObject
|
155
|
+
attr_reader :interval, :interval_count
|
156
|
+
end
|
157
|
+
|
158
|
+
class LineEndsAt < Stripe::StripeObject
|
159
|
+
attr_reader :id
|
160
|
+
end
|
161
|
+
attr_reader :computed, :duration, :line_ends_at, :timestamp, :type
|
162
|
+
end
|
163
|
+
attr_reader :bill_from, :bill_until
|
164
|
+
end
|
165
|
+
attr_reader :applies_to, :bill_on_acceptance, :billing_behavior, :customer, :description, :end_behavior, :proration_behavior
|
166
|
+
end
|
167
|
+
|
168
|
+
class SubscriptionSchedule < Stripe::StripeObject
|
169
|
+
class AppliesTo < Stripe::StripeObject
|
170
|
+
attr_reader :new_reference, :subscription_schedule, :type
|
171
|
+
end
|
172
|
+
attr_reader :applies_to, :subscription_schedule
|
173
|
+
end
|
174
|
+
|
175
|
+
class TotalDetails < Stripe::StripeObject
|
176
|
+
class Breakdown < Stripe::StripeObject
|
177
|
+
class Discount < Stripe::StripeObject
|
178
|
+
attr_reader :amount, :discount
|
179
|
+
end
|
180
|
+
|
181
|
+
class Tax < Stripe::StripeObject
|
182
|
+
attr_reader :amount, :rate, :taxability_reason, :taxable_amount
|
183
|
+
end
|
184
|
+
attr_reader :discounts, :taxes
|
185
|
+
end
|
186
|
+
attr_reader :amount_discount, :amount_shipping, :amount_tax, :breakdown
|
187
|
+
end
|
188
|
+
|
189
|
+
class TransferData < Stripe::StripeObject
|
190
|
+
attr_reader :amount, :amount_percent, :destination
|
191
|
+
end
|
192
|
+
# Allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
|
193
|
+
attr_reader :allow_backdated_lines
|
194
|
+
# Total before any discounts or taxes are applied.
|
195
|
+
attr_reader :amount_subtotal
|
196
|
+
# Total after discounts and taxes are applied.
|
197
|
+
attr_reader :amount_total
|
198
|
+
# ID of the Connect Application that created the quote.
|
199
|
+
attr_reader :application
|
200
|
+
# The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Only applicable if there are no line items with recurring prices on the quote.
|
201
|
+
attr_reader :application_fee_amount
|
202
|
+
# A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. Only applicable if there are line items with recurring prices on the quote.
|
203
|
+
attr_reader :application_fee_percent
|
204
|
+
# Attribute for field automatic_tax
|
205
|
+
attr_reader :automatic_tax
|
206
|
+
# Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or on finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
|
207
|
+
attr_reader :collection_method
|
208
|
+
# Attribute for field computed
|
209
|
+
attr_reader :computed
|
210
|
+
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
211
|
+
attr_reader :created
|
212
|
+
# 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).
|
213
|
+
attr_reader :currency
|
214
|
+
# The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
|
215
|
+
attr_reader :customer
|
216
|
+
# The tax rates applied to this quote.
|
217
|
+
attr_reader :default_tax_rates
|
218
|
+
# A description that will be displayed on the quote PDF.
|
219
|
+
attr_reader :description
|
220
|
+
# The discounts applied to this quote.
|
221
|
+
attr_reader :discounts
|
222
|
+
# The date on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.
|
223
|
+
attr_reader :expires_at
|
224
|
+
# A footer that will be displayed on the quote PDF.
|
225
|
+
attr_reader :footer
|
226
|
+
# Details of the quote that was cloned. See the [cloning documentation](https://stripe.com/docs/quotes/clone) for more details.
|
227
|
+
attr_reader :from_quote
|
228
|
+
# A header that will be displayed on the quote PDF.
|
229
|
+
attr_reader :header
|
230
|
+
# Unique identifier for the object.
|
231
|
+
attr_reader :id
|
232
|
+
# The invoice that was created from this quote.
|
233
|
+
attr_reader :invoice
|
234
|
+
# Attribute for field invoice_settings
|
235
|
+
attr_reader :invoice_settings
|
236
|
+
# A list of items the customer is being quoted for.
|
237
|
+
attr_reader :line_items
|
238
|
+
# A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
|
239
|
+
attr_reader :lines
|
240
|
+
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
241
|
+
attr_reader :livemode
|
242
|
+
# 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.
|
243
|
+
attr_reader :metadata
|
244
|
+
# A unique number that identifies this particular quote. This number is assigned once the quote is [finalized](https://stripe.com/docs/quotes/overview#finalize).
|
245
|
+
attr_reader :number
|
246
|
+
# String representing the object's type. Objects of the same type share the same value.
|
247
|
+
attr_reader :object
|
248
|
+
# The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details.
|
249
|
+
attr_reader :on_behalf_of
|
250
|
+
# The status of the quote.
|
251
|
+
attr_reader :status
|
252
|
+
# Details on when and why a quote has been marked as stale or canceled.
|
253
|
+
attr_reader :status_details
|
254
|
+
# Attribute for field status_transitions
|
255
|
+
attr_reader :status_transitions
|
256
|
+
# The subscription that was created or updated from this quote.
|
257
|
+
attr_reader :subscription
|
258
|
+
# Attribute for field subscription_data
|
259
|
+
attr_reader :subscription_data
|
260
|
+
# List representing overrides for `subscription_data` configurations for specific subscription schedules.
|
261
|
+
attr_reader :subscription_data_overrides
|
262
|
+
# The subscription schedule that was created or updated from this quote.
|
263
|
+
attr_reader :subscription_schedule
|
264
|
+
# The subscription schedules that were created or updated from this quote.
|
265
|
+
attr_reader :subscription_schedules
|
266
|
+
# ID of the test clock this quote belongs to.
|
267
|
+
attr_reader :test_clock
|
268
|
+
# Attribute for field total_details
|
269
|
+
attr_reader :total_details
|
270
|
+
# The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices.
|
271
|
+
attr_reader :transfer_data
|
272
|
+
|
21
273
|
# Accepts the specified quote.
|
22
274
|
def accept(params = {}, opts = {})
|
23
275
|
request_stripe_object(
|