stripe 13.3.0.pre.beta.3 → 13.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +650 -1402
- data/OPENAPI_VERSION +1 -1
- data/VERSION +1 -1
- data/lib/stripe/object_types.rb +0 -32
- data/lib/stripe/resources/account.rb +2 -232
- data/lib/stripe/resources/account_link.rb +0 -9
- data/lib/stripe/resources/account_session.rb +0 -103
- data/lib/stripe/resources/apple_pay_domain.rb +2 -20
- data/lib/stripe/resources/application_fee.rb +2 -36
- data/lib/stripe/resources/application_fee_refund.rb +0 -17
- data/lib/stripe/resources/apps/secret.rb +2 -24
- data/lib/stripe/resources/balance.rb +0 -59
- data/lib/stripe/resources/balance_transaction.rb +2 -36
- data/lib/stripe/resources/bank_account.rb +3 -61
- data/lib/stripe/resources/billing/alert.rb +2 -23
- data/lib/stripe/resources/billing/credit_balance_summary.rb +0 -25
- data/lib/stripe/resources/billing/credit_balance_transaction.rb +2 -50
- data/lib/stripe/resources/billing/credit_grant.rb +2 -46
- data/lib/stripe/resources/billing/meter.rb +2 -44
- data/lib/stripe/resources/billing/meter_event.rb +0 -15
- data/lib/stripe/resources/billing/meter_event_adjustment.rb +0 -16
- data/lib/stripe/resources/billing/meter_event_summary.rb +0 -15
- data/lib/stripe/resources/billing_portal/configuration.rb +2 -72
- data/lib/stripe/resources/billing_portal/session.rb +0 -61
- data/lib/stripe/resources/capability.rb +0 -38
- data/lib/stripe/resources/card.rb +1 -77
- data/lib/stripe/resources/cash_balance.rb +0 -14
- data/lib/stripe/resources/charge.rb +2 -471
- data/lib/stripe/resources/checkout/session.rb +2 -498
- data/lib/stripe/resources/climate/order.rb +2 -57
- data/lib/stripe/resources/climate/product.rb +2 -26
- data/lib/stripe/resources/climate/supplier.rb +2 -20
- data/lib/stripe/resources/confirmation_token.rb +0 -297
- data/lib/stripe/resources/country_spec.rb +2 -29
- data/lib/stripe/resources/coupon.rb +2 -46
- data/lib/stripe/resources/credit_note.rb +2 -93
- data/lib/stripe/resources/credit_note_line_item.rb +0 -46
- data/lib/stripe/resources/customer.rb +2 -95
- data/lib/stripe/resources/customer_balance_transaction.rb +0 -27
- data/lib/stripe/resources/customer_cash_balance_transaction.rb +0 -72
- data/lib/stripe/resources/customer_session.rb +0 -34
- data/lib/stripe/resources/discount.rb +0 -29
- data/lib/stripe/resources/dispute.rb +2 -98
- data/lib/stripe/resources/entitlements/active_entitlement.rb +2 -13
- data/lib/stripe/resources/entitlements/feature.rb +2 -17
- data/lib/stripe/resources/ephemeral_key.rb +0 -13
- data/lib/stripe/resources/event.rb +2 -46
- data/lib/stripe/resources/exchange_rate.rb +2 -9
- data/lib/stripe/resources/file.rb +2 -25
- data/lib/stripe/resources/file_link.rb +2 -21
- data/lib/stripe/resources/financial_connections/account.rb +2 -89
- data/lib/stripe/resources/financial_connections/account_owner.rb +0 -17
- data/lib/stripe/resources/financial_connections/account_ownership.rb +0 -9
- data/lib/stripe/resources/financial_connections/session.rb +0 -49
- data/lib/stripe/resources/financial_connections/transaction.rb +2 -30
- data/lib/stripe/resources/forwarding/request.rb +2 -42
- data/lib/stripe/resources/funding_instructions.rb +0 -82
- data/lib/stripe/resources/identity/verification_report.rb +2 -94
- data/lib/stripe/resources/identity/verification_session.rb +2 -78
- data/lib/stripe/resources/invoice.rb +2 -420
- data/lib/stripe/resources/invoice_item.rb +2 -56
- data/lib/stripe/resources/invoice_line_item.rb +0 -83
- data/lib/stripe/resources/invoice_rendering_template.rb +2 -19
- data/lib/stripe/resources/issuing/authorization.rb +2 -131
- data/lib/stripe/resources/issuing/card.rb +2 -88
- data/lib/stripe/resources/issuing/cardholder.rb +2 -78
- data/lib/stripe/resources/issuing/dispute.rb +2 -67
- data/lib/stripe/resources/issuing/personalization_design.rb +2 -40
- data/lib/stripe/resources/issuing/physical_bundle.rb +2 -20
- data/lib/stripe/resources/issuing/token.rb +2 -48
- data/lib/stripe/resources/issuing/transaction.rb +2 -108
- data/lib/stripe/resources/line_item.rb +0 -50
- data/lib/stripe/resources/login_link.rb +0 -7
- data/lib/stripe/resources/mandate.rb +0 -78
- data/lib/stripe/resources/payment_intent.rb +2 -714
- data/lib/stripe/resources/payment_link.rb +2 -200
- data/lib/stripe/resources/payment_method.rb +2 -370
- data/lib/stripe/resources/payment_method_configuration.rb +2 -432
- data/lib/stripe/resources/payment_method_domain.rb +2 -59
- data/lib/stripe/resources/payout.rb +2 -58
- data/lib/stripe/resources/person.rb +0 -128
- data/lib/stripe/resources/plan.rb +2 -54
- data/lib/stripe/resources/price.rb +2 -79
- data/lib/stripe/resources/product.rb +2 -62
- data/lib/stripe/resources/product_feature.rb +0 -12
- data/lib/stripe/resources/promotion_code.rb +2 -37
- data/lib/stripe/resources/quote.rb +2 -358
- data/lib/stripe/resources/radar/early_fraud_warning.rb +2 -19
- data/lib/stripe/resources/radar/value_list.rb +2 -25
- data/lib/stripe/resources/radar/value_list_item.rb +2 -19
- data/lib/stripe/resources/refund.rb +2 -132
- data/lib/stripe/resources/reporting/report_run.rb +2 -31
- data/lib/stripe/resources/reporting/report_type.rb +2 -21
- data/lib/stripe/resources/reversal.rb +0 -21
- data/lib/stripe/resources/review.rb +2 -38
- data/lib/stripe/resources/setup_attempt.rb +2 -103
- data/lib/stripe/resources/setup_intent.rb +2 -160
- data/lib/stripe/resources/shipping_rate.rb +2 -44
- data/lib/stripe/resources/sigma/scheduled_query_run.rb +2 -28
- data/lib/stripe/resources/source.rb +0 -197
- data/lib/stripe/resources/source_transaction.rb +0 -48
- data/lib/stripe/resources/subscription.rb +2 -216
- data/lib/stripe/resources/subscription_item.rb +2 -48
- data/lib/stripe/resources/subscription_schedule.rb +2 -175
- data/lib/stripe/resources/tax/calculation.rb +0 -72
- data/lib/stripe/resources/tax/calculation_line_item.rb +0 -33
- data/lib/stripe/resources/tax/registration.rb +2 -381
- data/lib/stripe/resources/tax/settings.rb +0 -33
- data/lib/stripe/resources/tax/transaction.rb +0 -68
- data/lib/stripe/resources/tax/transaction_line_item.rb +0 -30
- data/lib/stripe/resources/tax_code.rb +2 -11
- data/lib/stripe/resources/tax_id.rb +2 -32
- data/lib/stripe/resources/tax_rate.rb +2 -44
- data/lib/stripe/resources/terminal/configuration.rb +2 -109
- data/lib/stripe/resources/terminal/connection_token.rb +0 -7
- data/lib/stripe/resources/terminal/location.rb +2 -22
- data/lib/stripe/resources/terminal/reader.rb +2 -180
- data/lib/stripe/resources/test_helpers/test_clock.rb +2 -29
- data/lib/stripe/resources/token.rb +0 -29
- data/lib/stripe/resources/topup.rb +2 -35
- data/lib/stripe/resources/transfer.rb +2 -37
- data/lib/stripe/resources/treasury/credit_reversal.rb +2 -34
- data/lib/stripe/resources/treasury/debit_reversal.rb +2 -40
- data/lib/stripe/resources/treasury/financial_account.rb +2 -59
- data/lib/stripe/resources/treasury/financial_account_features.rb +0 -91
- data/lib/stripe/resources/treasury/inbound_transfer.rb +2 -68
- data/lib/stripe/resources/treasury/outbound_payment.rb +2 -87
- data/lib/stripe/resources/treasury/outbound_transfer.rb +2 -84
- data/lib/stripe/resources/treasury/received_credit.rb +2 -72
- data/lib/stripe/resources/treasury/received_debit.rb +2 -69
- data/lib/stripe/resources/treasury/transaction.rb +2 -44
- data/lib/stripe/resources/treasury/transaction_entry.rb +2 -36
- data/lib/stripe/resources/usage_record.rb +0 -13
- data/lib/stripe/resources/usage_record_summary.rb +0 -18
- data/lib/stripe/resources/v2/billing/meter_event.rb +0 -18
- data/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +0 -20
- data/lib/stripe/resources/v2/billing/meter_event_session.rb +0 -14
- data/lib/stripe/resources/v2/event.rb +0 -21
- data/lib/stripe/resources/v2/event_destination.rb +0 -49
- data/lib/stripe/resources/webhook_endpoint.rb +2 -34
- data/lib/stripe/resources.rb +0 -31
- data/lib/stripe/services/financial_connections/account_service.rb +1 -3
- data/lib/stripe/services/financial_connections_service.rb +1 -2
- data/lib/stripe/services/invoice_service.rb +1 -44
- data/lib/stripe/services/issuing_service.rb +1 -5
- data/lib/stripe/services/payment_intent_service.rb +0 -37
- data/lib/stripe/services/quote_service.rb +1 -49
- data/lib/stripe/services/subscription_schedule_service.rb +0 -11
- data/lib/stripe/services/tax_service.rb +1 -3
- data/lib/stripe/services/terminal/reader_service.rb +0 -33
- data/lib/stripe/services/terminal_service.rb +1 -2
- data/lib/stripe/services/v1_services.rb +1 -8
- data/lib/stripe/services.rb +0 -25
- data/lib/stripe/stripe_client.rb +1 -1
- data/lib/stripe/stripe_configuration.rb +1 -3
- data/lib/stripe/stripe_object.rb +3 -8
- data/lib/stripe/util.rb +2 -8
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe.rb +0 -45
- data/stripe.gemspec +1 -2
- metadata +4 -62
- data/lib/stripe/request_signing_authenticator.rb +0 -79
- data/lib/stripe/resources/account_notice.rb +0 -60
- data/lib/stripe/resources/application.rb +0 -20
- data/lib/stripe/resources/billing/alert_triggered.rb +0 -26
- data/lib/stripe/resources/billing/meter_error_report.rb +0 -44
- data/lib/stripe/resources/capital/financing_offer.rb +0 -94
- data/lib/stripe/resources/capital/financing_summary.rb +0 -32
- data/lib/stripe/resources/capital/financing_transaction.rb +0 -56
- data/lib/stripe/resources/connect_collection_transfer.rb +0 -24
- data/lib/stripe/resources/entitlements/active_entitlement_summary.rb +0 -23
- data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +0 -27
- data/lib/stripe/resources/financial_connections/institution.rb +0 -61
- data/lib/stripe/resources/gift_cards/card.rb +0 -96
- data/lib/stripe/resources/gift_cards/transaction.rb +0 -132
- data/lib/stripe/resources/invoice_payment.rb +0 -46
- data/lib/stripe/resources/issuing/credit_underwriting_record.rb +0 -145
- data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +0 -49
- data/lib/stripe/resources/issuing/fraud_liability_debit.rb +0 -43
- data/lib/stripe/resources/issuing/settlement.rb +0 -49
- data/lib/stripe/resources/margin.rb +0 -56
- data/lib/stripe/resources/order.rb +0 -322
- data/lib/stripe/resources/payment_attempt_record.rb +0 -100
- data/lib/stripe/resources/payment_record.rb +0 -188
- data/lib/stripe/resources/quote_line.rb +0 -136
- data/lib/stripe/resources/quote_preview_invoice.rb +0 -374
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +0 -170
- data/lib/stripe/resources/reserve_transaction.rb +0 -22
- data/lib/stripe/resources/source_mandate_notification.rb +0 -59
- data/lib/stripe/resources/tax/association.rb +0 -60
- data/lib/stripe/resources/tax/form.rb +0 -124
- data/lib/stripe/resources/tax_deducted_at_source.rb +0 -22
- data/lib/stripe/resources/terminal/reader_collected_data.rb +0 -30
- data/lib/stripe/resources/v2/amount.rb +0 -9
- data/lib/stripe/services/account_notice_service.rb +0 -39
- data/lib/stripe/services/capital/financing_offer_service.rb +0 -42
- data/lib/stripe/services/capital/financing_summary_service.rb +0 -19
- data/lib/stripe/services/capital/financing_transaction_service.rb +0 -31
- data/lib/stripe/services/capital_service.rb +0 -15
- data/lib/stripe/services/financial_connections/account_inferred_balance_service.rb +0 -19
- data/lib/stripe/services/financial_connections/institution_service.rb +0 -30
- data/lib/stripe/services/gift_cards/card_service.rb +0 -63
- data/lib/stripe/services/gift_cards/transaction_service.rb +0 -74
- data/lib/stripe/services/gift_cards_service.rb +0 -14
- data/lib/stripe/services/invoice_payment_service.rb +0 -28
- data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +0 -74
- data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +0 -30
- data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +0 -30
- data/lib/stripe/services/margin_service.rb +0 -50
- data/lib/stripe/services/order_line_item_service.rb +0 -17
- data/lib/stripe/services/order_service.rb +0 -78
- data/lib/stripe/services/payment_attempt_record_service.rb +0 -28
- data/lib/stripe/services/payment_record_service.rb +0 -78
- data/lib/stripe/services/quote_line_service.rb +0 -17
- data/lib/stripe/services/quote_preview_invoice_service.rb +0 -17
- data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +0 -17
- data/lib/stripe/services/tax/association_service.rb +0 -19
- data/lib/stripe/services/tax/form_service.rb +0 -37
- data/lib/stripe/services/terminal/reader_collected_data_service.rb +0 -19
@@ -1,74 +0,0 @@
|
|
1
|
-
# File generated from our OpenAPI spec
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
module Stripe
|
5
|
-
module Issuing
|
6
|
-
class CreditUnderwritingRecordService < StripeService
|
7
|
-
# Update a CreditUnderwritingRecord object to correct mistakes.
|
8
|
-
def correct(credit_underwriting_record, params = {}, opts = {})
|
9
|
-
request(
|
10
|
-
method: :post,
|
11
|
-
path: format("/v1/issuing/credit_underwriting_records/%<credit_underwriting_record>s/correct", { credit_underwriting_record: CGI.escape(credit_underwriting_record) }),
|
12
|
-
params: params,
|
13
|
-
opts: opts,
|
14
|
-
base_address: :api
|
15
|
-
)
|
16
|
-
end
|
17
|
-
|
18
|
-
# Creates a CreditUnderwritingRecord object with information about a credit application submission.
|
19
|
-
def create_from_application(params = {}, opts = {})
|
20
|
-
request(
|
21
|
-
method: :post,
|
22
|
-
path: "/v1/issuing/credit_underwriting_records/create_from_application",
|
23
|
-
params: params,
|
24
|
-
opts: opts,
|
25
|
-
base_address: :api
|
26
|
-
)
|
27
|
-
end
|
28
|
-
|
29
|
-
# Creates a CreditUnderwritingRecord object from an underwriting decision coming from a proactive review of an existing accountholder.
|
30
|
-
def create_from_proactive_review(params = {}, opts = {})
|
31
|
-
request(
|
32
|
-
method: :post,
|
33
|
-
path: "/v1/issuing/credit_underwriting_records/create_from_proactive_review",
|
34
|
-
params: params,
|
35
|
-
opts: opts,
|
36
|
-
base_address: :api
|
37
|
-
)
|
38
|
-
end
|
39
|
-
|
40
|
-
# Retrieves a list of CreditUnderwritingRecord objects. The objects are sorted in descending order by creation date, with the most-recently-created object appearing first.
|
41
|
-
def list(params = {}, opts = {})
|
42
|
-
request(
|
43
|
-
method: :get,
|
44
|
-
path: "/v1/issuing/credit_underwriting_records",
|
45
|
-
params: params,
|
46
|
-
opts: opts,
|
47
|
-
base_address: :api
|
48
|
-
)
|
49
|
-
end
|
50
|
-
|
51
|
-
# Update a CreditUnderwritingRecord object from a decision made on a credit application.
|
52
|
-
def report_decision(credit_underwriting_record, params = {}, opts = {})
|
53
|
-
request(
|
54
|
-
method: :post,
|
55
|
-
path: format("/v1/issuing/credit_underwriting_records/%<credit_underwriting_record>s/report_decision", { credit_underwriting_record: CGI.escape(credit_underwriting_record) }),
|
56
|
-
params: params,
|
57
|
-
opts: opts,
|
58
|
-
base_address: :api
|
59
|
-
)
|
60
|
-
end
|
61
|
-
|
62
|
-
# Retrieves a CreditUnderwritingRecord object.
|
63
|
-
def retrieve(credit_underwriting_record, params = {}, opts = {})
|
64
|
-
request(
|
65
|
-
method: :get,
|
66
|
-
path: format("/v1/issuing/credit_underwriting_records/%<credit_underwriting_record>s", { credit_underwriting_record: CGI.escape(credit_underwriting_record) }),
|
67
|
-
params: params,
|
68
|
-
opts: opts,
|
69
|
-
base_address: :api
|
70
|
-
)
|
71
|
-
end
|
72
|
-
end
|
73
|
-
end
|
74
|
-
end
|
@@ -1,30 +0,0 @@
|
|
1
|
-
# File generated from our OpenAPI spec
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
module Stripe
|
5
|
-
module Issuing
|
6
|
-
class DisputeSettlementDetailService < StripeService
|
7
|
-
# Returns a list of Issuing DisputeSettlementDetail objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
|
8
|
-
def list(params = {}, opts = {})
|
9
|
-
request(
|
10
|
-
method: :get,
|
11
|
-
path: "/v1/issuing/dispute_settlement_details",
|
12
|
-
params: params,
|
13
|
-
opts: opts,
|
14
|
-
base_address: :api
|
15
|
-
)
|
16
|
-
end
|
17
|
-
|
18
|
-
# Retrieves an Issuing DisputeSettlementDetail object.
|
19
|
-
def retrieve(dispute_settlement_detail, params = {}, opts = {})
|
20
|
-
request(
|
21
|
-
method: :get,
|
22
|
-
path: format("/v1/issuing/dispute_settlement_details/%<dispute_settlement_detail>s", { dispute_settlement_detail: CGI.escape(dispute_settlement_detail) }),
|
23
|
-
params: params,
|
24
|
-
opts: opts,
|
25
|
-
base_address: :api
|
26
|
-
)
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
@@ -1,30 +0,0 @@
|
|
1
|
-
# File generated from our OpenAPI spec
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
module Stripe
|
5
|
-
module Issuing
|
6
|
-
class FraudLiabilityDebitService < StripeService
|
7
|
-
# Returns a list of Issuing FraudLiabilityDebit objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
|
8
|
-
def list(params = {}, opts = {})
|
9
|
-
request(
|
10
|
-
method: :get,
|
11
|
-
path: "/v1/issuing/fraud_liability_debits",
|
12
|
-
params: params,
|
13
|
-
opts: opts,
|
14
|
-
base_address: :api
|
15
|
-
)
|
16
|
-
end
|
17
|
-
|
18
|
-
# Retrieves an Issuing FraudLiabilityDebit object.
|
19
|
-
def retrieve(fraud_liability_debit, params = {}, opts = {})
|
20
|
-
request(
|
21
|
-
method: :get,
|
22
|
-
path: format("/v1/issuing/fraud_liability_debits/%<fraud_liability_debit>s", { fraud_liability_debit: CGI.escape(fraud_liability_debit) }),
|
23
|
-
params: params,
|
24
|
-
opts: opts,
|
25
|
-
base_address: :api
|
26
|
-
)
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
@@ -1,50 +0,0 @@
|
|
1
|
-
# File generated from our OpenAPI spec
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
module Stripe
|
5
|
-
class MarginService < StripeService
|
6
|
-
# Create a margin object to be used with invoices, invoice items, and invoice line items for a customer to represent a partner discount. A margin has a percent_off which is the percent that will be taken off the subtotal after all items and other discounts and promotions) of any invoices for a customer. Calculation of prorations do not include any partner margins applied on the original invoice item.
|
7
|
-
def create(params = {}, opts = {})
|
8
|
-
request(
|
9
|
-
method: :post,
|
10
|
-
path: "/v1/billing/margins",
|
11
|
-
params: params,
|
12
|
-
opts: opts,
|
13
|
-
base_address: :api
|
14
|
-
)
|
15
|
-
end
|
16
|
-
|
17
|
-
# Retrieve a list of your margins.
|
18
|
-
def list(params = {}, opts = {})
|
19
|
-
request(
|
20
|
-
method: :get,
|
21
|
-
path: "/v1/billing/margins",
|
22
|
-
params: params,
|
23
|
-
opts: opts,
|
24
|
-
base_address: :api
|
25
|
-
)
|
26
|
-
end
|
27
|
-
|
28
|
-
# Retrieve a margin object with the given ID.
|
29
|
-
def retrieve(margin, params = {}, opts = {})
|
30
|
-
request(
|
31
|
-
method: :get,
|
32
|
-
path: format("/v1/billing/margins/%<margin>s", { margin: CGI.escape(margin) }),
|
33
|
-
params: params,
|
34
|
-
opts: opts,
|
35
|
-
base_address: :api
|
36
|
-
)
|
37
|
-
end
|
38
|
-
|
39
|
-
# Update the specified margin object. Certain fields of the margin object are not editable.
|
40
|
-
def update(margin, params = {}, opts = {})
|
41
|
-
request(
|
42
|
-
method: :post,
|
43
|
-
path: format("/v1/billing/margins/%<margin>s", { margin: CGI.escape(margin) }),
|
44
|
-
params: params,
|
45
|
-
opts: opts,
|
46
|
-
base_address: :api
|
47
|
-
)
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
# File generated from our OpenAPI spec
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
module Stripe
|
5
|
-
class OrderLineItemService < StripeService
|
6
|
-
# When retrieving an order, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
|
7
|
-
def list(id, params = {}, opts = {})
|
8
|
-
request(
|
9
|
-
method: :get,
|
10
|
-
path: format("/v1/orders/%<id>s/line_items", { id: CGI.escape(id) }),
|
11
|
-
params: params,
|
12
|
-
opts: opts,
|
13
|
-
base_address: :api
|
14
|
-
)
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
@@ -1,78 +0,0 @@
|
|
1
|
-
# File generated from our OpenAPI spec
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
module Stripe
|
5
|
-
class OrderService < StripeService
|
6
|
-
attr_reader :line_items
|
7
|
-
|
8
|
-
def initialize(requestor)
|
9
|
-
super(requestor)
|
10
|
-
@line_items = Stripe::OrderLineItemService.new(@requestor)
|
11
|
-
end
|
12
|
-
|
13
|
-
# Cancels the order as well as the payment intent if one is attached.
|
14
|
-
def cancel(id, params = {}, opts = {})
|
15
|
-
request(
|
16
|
-
method: :post,
|
17
|
-
path: format("/v1/orders/%<id>s/cancel", { id: CGI.escape(id) }),
|
18
|
-
params: params,
|
19
|
-
opts: opts,
|
20
|
-
base_address: :api
|
21
|
-
)
|
22
|
-
end
|
23
|
-
|
24
|
-
# Creates a new open order object.
|
25
|
-
def create(params = {}, opts = {})
|
26
|
-
request(method: :post, path: "/v1/orders", params: params, opts: opts, base_address: :api)
|
27
|
-
end
|
28
|
-
|
29
|
-
# Returns a list of your orders. The orders are returned sorted by creation date, with the most recently created orders appearing first.
|
30
|
-
def list(params = {}, opts = {})
|
31
|
-
request(method: :get, path: "/v1/orders", params: params, opts: opts, base_address: :api)
|
32
|
-
end
|
33
|
-
|
34
|
-
# Reopens a submitted order.
|
35
|
-
def reopen(id, params = {}, opts = {})
|
36
|
-
request(
|
37
|
-
method: :post,
|
38
|
-
path: format("/v1/orders/%<id>s/reopen", { id: CGI.escape(id) }),
|
39
|
-
params: params,
|
40
|
-
opts: opts,
|
41
|
-
base_address: :api
|
42
|
-
)
|
43
|
-
end
|
44
|
-
|
45
|
-
# Retrieves the details of an existing order. Supply the unique order ID from either an order creation request or the order list, and Stripe will return the corresponding order information.
|
46
|
-
def retrieve(id, params = {}, opts = {})
|
47
|
-
request(
|
48
|
-
method: :get,
|
49
|
-
path: format("/v1/orders/%<id>s", { id: CGI.escape(id) }),
|
50
|
-
params: params,
|
51
|
-
opts: opts,
|
52
|
-
base_address: :api
|
53
|
-
)
|
54
|
-
end
|
55
|
-
|
56
|
-
# Submitting an Order transitions the status to processing and creates a PaymentIntent object so the order can be paid. If the Order has an amount_total of 0, no PaymentIntent object will be created. Once the order is submitted, its contents cannot be changed, unless the [reopen](https://stripe.com/docs/api#reopen_order) method is called.
|
57
|
-
def submit(id, params = {}, opts = {})
|
58
|
-
request(
|
59
|
-
method: :post,
|
60
|
-
path: format("/v1/orders/%<id>s/submit", { id: CGI.escape(id) }),
|
61
|
-
params: params,
|
62
|
-
opts: opts,
|
63
|
-
base_address: :api
|
64
|
-
)
|
65
|
-
end
|
66
|
-
|
67
|
-
# Updates the specific order by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
68
|
-
def update(id, params = {}, opts = {})
|
69
|
-
request(
|
70
|
-
method: :post,
|
71
|
-
path: format("/v1/orders/%<id>s", { id: CGI.escape(id) }),
|
72
|
-
params: params,
|
73
|
-
opts: opts,
|
74
|
-
base_address: :api
|
75
|
-
)
|
76
|
-
end
|
77
|
-
end
|
78
|
-
end
|
@@ -1,28 +0,0 @@
|
|
1
|
-
# File generated from our OpenAPI spec
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
module Stripe
|
5
|
-
class PaymentAttemptRecordService < StripeService
|
6
|
-
# List all the Payment Attempt Records attached to the specified Payment Record.
|
7
|
-
def list(params = {}, opts = {})
|
8
|
-
request(
|
9
|
-
method: :get,
|
10
|
-
path: "/v1/payment_attempt_records",
|
11
|
-
params: params,
|
12
|
-
opts: opts,
|
13
|
-
base_address: :api
|
14
|
-
)
|
15
|
-
end
|
16
|
-
|
17
|
-
# Retrieves a Payment Attempt Record with the given ID
|
18
|
-
def retrieve(id, params = {}, opts = {})
|
19
|
-
request(
|
20
|
-
method: :get,
|
21
|
-
path: format("/v1/payment_attempt_records/%<id>s", { id: CGI.escape(id) }),
|
22
|
-
params: params,
|
23
|
-
opts: opts,
|
24
|
-
base_address: :api
|
25
|
-
)
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
@@ -1,78 +0,0 @@
|
|
1
|
-
# File generated from our OpenAPI spec
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
module Stripe
|
5
|
-
class PaymentRecordService < StripeService
|
6
|
-
# Report a new Payment Record. You may report a Payment Record as it is
|
7
|
-
# initialized and later report updates through the other report_* methods, or report Payment
|
8
|
-
# Records in a terminal state directly, through this method.
|
9
|
-
def report_payment(params = {}, opts = {})
|
10
|
-
request(
|
11
|
-
method: :post,
|
12
|
-
path: "/v1/payment_records/report_payment",
|
13
|
-
params: params,
|
14
|
-
opts: opts,
|
15
|
-
base_address: :api
|
16
|
-
)
|
17
|
-
end
|
18
|
-
|
19
|
-
# Report a new payment attempt on the specified Payment Record. A new payment
|
20
|
-
# attempt can only be specified if all other payment attempts are canceled or failed.
|
21
|
-
def report_payment_attempt(id, params = {}, opts = {})
|
22
|
-
request(
|
23
|
-
method: :post,
|
24
|
-
path: format("/v1/payment_records/%<id>s/report_payment_attempt", { id: CGI.escape(id) }),
|
25
|
-
params: params,
|
26
|
-
opts: opts,
|
27
|
-
base_address: :api
|
28
|
-
)
|
29
|
-
end
|
30
|
-
|
31
|
-
# Report that the most recent payment attempt on the specified Payment Record
|
32
|
-
# was canceled.
|
33
|
-
def report_payment_attempt_canceled(id, params = {}, opts = {})
|
34
|
-
request(
|
35
|
-
method: :post,
|
36
|
-
path: format("/v1/payment_records/%<id>s/report_payment_attempt_canceled", { id: CGI.escape(id) }),
|
37
|
-
params: params,
|
38
|
-
opts: opts,
|
39
|
-
base_address: :api
|
40
|
-
)
|
41
|
-
end
|
42
|
-
|
43
|
-
# Report that the most recent payment attempt on the specified Payment Record
|
44
|
-
# failed or errored.
|
45
|
-
def report_payment_attempt_failed(id, params = {}, opts = {})
|
46
|
-
request(
|
47
|
-
method: :post,
|
48
|
-
path: format("/v1/payment_records/%<id>s/report_payment_attempt_failed", { id: CGI.escape(id) }),
|
49
|
-
params: params,
|
50
|
-
opts: opts,
|
51
|
-
base_address: :api
|
52
|
-
)
|
53
|
-
end
|
54
|
-
|
55
|
-
# Report that the most recent payment attempt on the specified Payment Record
|
56
|
-
# was guaranteed.
|
57
|
-
def report_payment_attempt_guaranteed(id, params = {}, opts = {})
|
58
|
-
request(
|
59
|
-
method: :post,
|
60
|
-
path: format("/v1/payment_records/%<id>s/report_payment_attempt_guaranteed", { id: CGI.escape(id) }),
|
61
|
-
params: params,
|
62
|
-
opts: opts,
|
63
|
-
base_address: :api
|
64
|
-
)
|
65
|
-
end
|
66
|
-
|
67
|
-
# Retrieves a Payment Record with the given ID
|
68
|
-
def retrieve(id, params = {}, opts = {})
|
69
|
-
request(
|
70
|
-
method: :get,
|
71
|
-
path: format("/v1/payment_records/%<id>s", { id: CGI.escape(id) }),
|
72
|
-
params: params,
|
73
|
-
opts: opts,
|
74
|
-
base_address: :api
|
75
|
-
)
|
76
|
-
end
|
77
|
-
end
|
78
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
# File generated from our OpenAPI spec
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
module Stripe
|
5
|
-
class QuoteLineService < StripeService
|
6
|
-
# Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
|
7
|
-
def list(quote, params = {}, opts = {})
|
8
|
-
request(
|
9
|
-
method: :get,
|
10
|
-
path: format("/v1/quotes/%<quote>s/lines", { quote: CGI.escape(quote) }),
|
11
|
-
params: params,
|
12
|
-
opts: opts,
|
13
|
-
base_address: :api
|
14
|
-
)
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
# File generated from our OpenAPI spec
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
module Stripe
|
5
|
-
class QuotePreviewInvoiceService < StripeService
|
6
|
-
# Preview the invoices that would be generated by accepting the quote.
|
7
|
-
def list(quote, params = {}, opts = {})
|
8
|
-
request(
|
9
|
-
method: :get,
|
10
|
-
path: format("/v1/quotes/%<quote>s/preview_invoices", { quote: CGI.escape(quote) }),
|
11
|
-
params: params,
|
12
|
-
opts: opts,
|
13
|
-
base_address: :api
|
14
|
-
)
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
# File generated from our OpenAPI spec
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
module Stripe
|
5
|
-
class QuotePreviewSubscriptionScheduleService < StripeService
|
6
|
-
# Preview the schedules that would be generated by accepting the quote
|
7
|
-
def list(quote, params = {}, opts = {})
|
8
|
-
request(
|
9
|
-
method: :get,
|
10
|
-
path: format("/v1/quotes/%<quote>s/preview_subscription_schedules", { quote: CGI.escape(quote) }),
|
11
|
-
params: params,
|
12
|
-
opts: opts,
|
13
|
-
base_address: :api
|
14
|
-
)
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
# File generated from our OpenAPI spec
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
module Stripe
|
5
|
-
module Tax
|
6
|
-
class AssociationService < StripeService
|
7
|
-
# Finds a tax association object by PaymentIntent id.
|
8
|
-
def find(params = {}, opts = {})
|
9
|
-
request(
|
10
|
-
method: :get,
|
11
|
-
path: "/v1/tax/associations/find",
|
12
|
-
params: params,
|
13
|
-
opts: opts,
|
14
|
-
base_address: :api
|
15
|
-
)
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
@@ -1,37 +0,0 @@
|
|
1
|
-
# File generated from our OpenAPI spec
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
module Stripe
|
5
|
-
module Tax
|
6
|
-
class FormService < StripeService
|
7
|
-
# Returns a list of tax forms which were previously created. The tax forms are returned in sorted order, with the oldest tax forms appearing first.
|
8
|
-
def list(params = {}, opts = {})
|
9
|
-
request(method: :get, path: "/v1/tax/forms", params: params, opts: opts, base_address: :api)
|
10
|
-
end
|
11
|
-
|
12
|
-
# Download the PDF for a tax form.
|
13
|
-
def pdf(id, params = {}, opts = {}, &read_body_chunk_block)
|
14
|
-
opts = { api_base: APIRequestor.active_requestor.config.uploads_base }.merge(opts)
|
15
|
-
request_stream(
|
16
|
-
method: :get,
|
17
|
-
path: format("/v1/tax/forms/%<id>s/pdf", { id: CGI.escape(id) }),
|
18
|
-
params: params,
|
19
|
-
opts: opts,
|
20
|
-
base_address: :files,
|
21
|
-
&read_body_chunk_block
|
22
|
-
)
|
23
|
-
end
|
24
|
-
|
25
|
-
# Retrieves the details of a tax form that has previously been created. Supply the unique tax form ID that was returned from your previous request, and Stripe will return the corresponding tax form information.
|
26
|
-
def retrieve(id, params = {}, opts = {})
|
27
|
-
request(
|
28
|
-
method: :get,
|
29
|
-
path: format("/v1/tax/forms/%<id>s", { id: CGI.escape(id) }),
|
30
|
-
params: params,
|
31
|
-
opts: opts,
|
32
|
-
base_address: :api
|
33
|
-
)
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
# File generated from our OpenAPI spec
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
module Stripe
|
5
|
-
module Terminal
|
6
|
-
class ReaderCollectedDataService < StripeService
|
7
|
-
# Retrieve data collected using Reader hardware.
|
8
|
-
def retrieve(reader_collected_data, params = {}, opts = {})
|
9
|
-
request(
|
10
|
-
method: :get,
|
11
|
-
path: format("/v1/terminal/reader_collected_data/%<reader_collected_data>s", { reader_collected_data: CGI.escape(reader_collected_data) }),
|
12
|
-
params: params,
|
13
|
-
opts: opts,
|
14
|
-
base_address: :api
|
15
|
-
)
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|