stripe 13.2.0 → 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 +1396 -645
- data/OPENAPI_VERSION +1 -1
- data/VERSION +1 -1
- data/lib/stripe/object_types.rb +32 -0
- data/lib/stripe/request_signing_authenticator.rb +79 -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 +60 -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 +94 -0
- data/lib/stripe/resources/capital/financing_summary.rb +32 -0
- data/lib/stripe/resources/capital/financing_transaction.rb +56 -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 +87 -0
- data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +27 -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 +61 -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 +96 -0
- data/lib/stripe/resources/gift_cards/transaction.rb +132 -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 +418 -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 +46 -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 +145 -0
- data/lib/stripe/resources/issuing/dispute.rb +65 -0
- data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +49 -0
- data/lib/stripe/resources/issuing/fraud_liability_debit.rb +43 -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 +56 -0
- data/lib/stripe/resources/order.rb +322 -0
- data/lib/stripe/resources/payment_attempt_record.rb +100 -0
- data/lib/stripe/resources/payment_intent.rb +712 -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 +194 -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 +356 -0
- data/lib/stripe/resources/quote_line.rb +136 -0
- data/lib/stripe/resources/quote_preview_invoice.rb +374 -0
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +170 -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 +173 -0
- data/lib/stripe/resources/tax/association.rb +60 -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 +124 -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 +178 -0
- data/lib/stripe/resources/terminal/reader_collected_data.rb +30 -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 +31 -0
- data/lib/stripe/services/account_notice_service.rb +39 -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/services/capital/financing_offer_service.rb +42 -0
- data/lib/stripe/services/capital/financing_summary_service.rb +19 -0
- data/lib/stripe/services/capital/financing_transaction_service.rb +31 -0
- data/lib/stripe/services/capital_service.rb +15 -0
- data/lib/stripe/services/financial_connections/account_inferred_balance_service.rb +19 -0
- data/lib/stripe/services/financial_connections/account_service.rb +3 -1
- data/lib/stripe/services/financial_connections/institution_service.rb +30 -0
- data/lib/stripe/services/financial_connections_service.rb +2 -1
- data/lib/stripe/services/gift_cards/card_service.rb +63 -0
- data/lib/stripe/services/gift_cards/transaction_service.rb +74 -0
- data/lib/stripe/services/gift_cards_service.rb +14 -0
- data/lib/stripe/services/invoice_payment_service.rb +28 -0
- data/lib/stripe/services/invoice_service.rb +44 -1
- data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +74 -0
- data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +30 -0
- data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +30 -0
- data/lib/stripe/services/issuing_service.rb +5 -1
- data/lib/stripe/services/margin_service.rb +50 -0
- data/lib/stripe/services/order_line_item_service.rb +17 -0
- data/lib/stripe/services/order_service.rb +78 -0
- data/lib/stripe/services/payment_attempt_record_service.rb +28 -0
- data/lib/stripe/services/payment_intent_service.rb +37 -0
- data/lib/stripe/services/payment_record_service.rb +78 -0
- data/lib/stripe/services/quote_line_service.rb +17 -0
- data/lib/stripe/services/quote_preview_invoice_service.rb +17 -0
- data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +17 -0
- data/lib/stripe/services/quote_service.rb +49 -1
- data/lib/stripe/services/subscription_schedule_service.rb +11 -0
- data/lib/stripe/services/tax/association_service.rb +19 -0
- data/lib/stripe/services/tax/form_service.rb +37 -0
- data/lib/stripe/services/tax_service.rb +3 -1
- data/lib/stripe/services/terminal/reader_collected_data_service.rb +19 -0
- data/lib/stripe/services/terminal/reader_service.rb +33 -0
- data/lib/stripe/services/terminal_service.rb +2 -1
- data/lib/stripe/services/v1_services.rb +8 -1
- data/lib/stripe/services.rb +25 -0
- data/lib/stripe/stripe_configuration.rb +3 -1
- data/lib/stripe/stripe_object.rb +5 -0
- data/lib/stripe/util.rb +7 -1
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe.rb +45 -0
- data/stripe.gemspec +2 -1
- metadata +62 -4
@@ -20,6 +20,62 @@ module Stripe
|
|
20
20
|
"payout"
|
21
21
|
end
|
22
22
|
|
23
|
+
class TraceId < Stripe::StripeObject
|
24
|
+
attr_reader :status, :value
|
25
|
+
end
|
26
|
+
# The amount (in cents (or local equivalent)) that transfers to your bank account or debit card.
|
27
|
+
attr_reader :amount
|
28
|
+
# The application fee (if any) for the payout. [See the Connect documentation](https://stripe.com/docs/connect/instant-payouts#monetization-and-fees) for details.
|
29
|
+
attr_reader :application_fee
|
30
|
+
# The amount of the application fee (if any) requested for the payout. [See the Connect documentation](https://stripe.com/docs/connect/instant-payouts#monetization-and-fees) for details.
|
31
|
+
attr_reader :application_fee_amount
|
32
|
+
# Date that you can expect the payout to arrive in the bank. This factors in delays to account for weekends or bank holidays.
|
33
|
+
attr_reader :arrival_date
|
34
|
+
# Returns `true` if the payout is created by an [automated payout schedule](https://stripe.com/docs/payouts#payout-schedule) and `false` if it's [requested manually](https://stripe.com/docs/payouts#manual-payouts).
|
35
|
+
attr_reader :automatic
|
36
|
+
# ID of the balance transaction that describes the impact of this payout on your account balance.
|
37
|
+
attr_reader :balance_transaction
|
38
|
+
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
39
|
+
attr_reader :created
|
40
|
+
# 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).
|
41
|
+
attr_reader :currency
|
42
|
+
# An arbitrary string attached to the object. Often useful for displaying to users.
|
43
|
+
attr_reader :description
|
44
|
+
# ID of the bank account or card the payout is sent to.
|
45
|
+
attr_reader :destination
|
46
|
+
# If the payout fails or cancels, this is the ID of the balance transaction that reverses the initial balance transaction and returns the funds from the failed payout back in your balance.
|
47
|
+
attr_reader :failure_balance_transaction
|
48
|
+
# Error code that provides a reason for a payout failure, if available. View our [list of failure codes](https://stripe.com/docs/api#payout_failures).
|
49
|
+
attr_reader :failure_code
|
50
|
+
# Message that provides the reason for a payout failure, if available.
|
51
|
+
attr_reader :failure_message
|
52
|
+
# Unique identifier for the object.
|
53
|
+
attr_reader :id
|
54
|
+
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
55
|
+
attr_reader :livemode
|
56
|
+
# 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.
|
57
|
+
attr_reader :metadata
|
58
|
+
# The method used to send this payout, which can be `standard` or `instant`. `instant` is supported for payouts to debit cards and bank accounts in certain countries. Learn more about [bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks).
|
59
|
+
attr_reader :method
|
60
|
+
# String representing the object's type. Objects of the same type share the same value.
|
61
|
+
attr_reader :object
|
62
|
+
# If the payout reverses another, this is the ID of the original payout.
|
63
|
+
attr_reader :original_payout
|
64
|
+
# If `completed`, you can use the [Balance Transactions API](https://stripe.com/docs/api/balance_transactions/list#balance_transaction_list-payout) to list all balance transactions that are paid out in this payout.
|
65
|
+
attr_reader :reconciliation_status
|
66
|
+
# If the payout reverses, this is the ID of the payout that reverses this payout.
|
67
|
+
attr_reader :reversed_by
|
68
|
+
# The source balance this payout came from, which can be one of the following: `card`, `fpx`, or `bank_account`.
|
69
|
+
attr_reader :source_type
|
70
|
+
# Extra information about a payout that displays on the user's bank statement.
|
71
|
+
attr_reader :statement_descriptor
|
72
|
+
# Current status of the payout: `paid`, `pending`, `in_transit`, `canceled` or `failed`. A payout is `pending` until it's submitted to the bank, when it becomes `in_transit`. The status changes to `paid` if the transaction succeeds, or to `failed` or `canceled` (within 5 business days). Some payouts that fail might initially show as `paid`, then change to `failed`.
|
73
|
+
attr_reader :status
|
74
|
+
# A value that generates from the beneficiary's bank that allows users to track payouts with their bank. Banks might call this a "reference number" or something similar.
|
75
|
+
attr_reader :trace_id
|
76
|
+
# Can be `bank_account` or `card`.
|
77
|
+
attr_reader :type
|
78
|
+
|
23
79
|
# You can cancel a previously created payout if its status is pending. Stripe refunds the funds to your available balance. You can't cancel automatic Stripe payouts.
|
24
80
|
def cancel(params = {}, opts = {})
|
25
81
|
request_stripe_object(
|
@@ -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)
|