-
Notifications
You must be signed in to change notification settings - Fork 548
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1480 from stripe/latest-codegen-beta
Update generated code for beta
- Loading branch information
Showing
18 changed files
with
345 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v1319 | ||
v1333 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# File generated from our OpenAPI spec | ||
# frozen_string_literal: true | ||
|
||
module Stripe | ||
module Issuing | ||
# A fraud liability debit occurs when Stripe debits a platform's account for fraud losses on Issuing transactions. | ||
class FraudLiabilityDebit < APIResource | ||
extend Stripe::APIOperations::List | ||
|
||
OBJECT_NAME = "issuing.fraud_liability_debit" | ||
def self.object_name | ||
"issuing.fraud_liability_debit" | ||
end | ||
|
||
# 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. | ||
def self.list(filters = {}, opts = {}) | ||
request_stripe_object( | ||
method: :get, | ||
path: "/v1/issuing/fraud_liability_debits", | ||
params: filters, | ||
opts: opts | ||
) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# File generated from our OpenAPI spec | ||
# frozen_string_literal: true | ||
|
||
module Stripe | ||
# A Payment Attempt Record represents an individual attempt at making a payment, on or off Stripe. | ||
# Each payment attempt tries to collect a fixed amount of money from a fixed customer and payment | ||
# method. Payment Attempt Records are attached to Payment Records. Only one attempt per Payment Record | ||
# can have guaranteed funds. | ||
class PaymentAttemptRecord < APIResource | ||
extend Stripe::APIOperations::List | ||
|
||
OBJECT_NAME = "payment_attempt_record" | ||
def self.object_name | ||
"payment_attempt_record" | ||
end | ||
|
||
# List all the Payment Attempt Records attached to the specified Payment Record. | ||
def self.list(filters = {}, opts = {}) | ||
request_stripe_object( | ||
method: :get, | ||
path: "/v1/payment_attempt_records", | ||
params: filters, | ||
opts: opts | ||
) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
# File generated from our OpenAPI spec | ||
# frozen_string_literal: true | ||
|
||
module Stripe | ||
# A Payment Record is a resource that allows you to represent payments that occur on- or off-Stripe. | ||
# For example, you can create a Payment Record to model a payment made on a different payment processor, | ||
# in order to mark an Invoice as paid and a Subscription as active. Payment Records consist of one or | ||
# more Payment Attempt Records, which represent individual attempts made on a payment network. | ||
class PaymentRecord < APIResource | ||
OBJECT_NAME = "payment_record" | ||
def self.object_name | ||
"payment_record" | ||
end | ||
|
||
# Report a new Payment Record. You may report a Payment Record as it is | ||
# initialized and later report updates through the other report_* methods, or report Payment | ||
# Records in a terminal state directly, through this method. | ||
def self.report_payment(params = {}, opts = {}) | ||
request_stripe_object( | ||
method: :post, | ||
path: "/v1/payment_records/report_payment", | ||
params: params, | ||
opts: opts | ||
) | ||
end | ||
|
||
# Report a new payment attempt on the specified Payment Record. A new payment | ||
# attempt can only be specified if all other payment attempts are canceled or failed. | ||
def report_payment_attempt(params = {}, opts = {}) | ||
request_stripe_object( | ||
method: :post, | ||
path: format("/v1/payment_records/%<id>s/report_payment_attempt", { id: CGI.escape(self["id"]) }), | ||
params: params, | ||
opts: opts | ||
) | ||
end | ||
|
||
# Report a new payment attempt on the specified Payment Record. A new payment | ||
# attempt can only be specified if all other payment attempts are canceled or failed. | ||
def self.report_payment_attempt(id, params = {}, opts = {}) | ||
request_stripe_object( | ||
method: :post, | ||
path: format("/v1/payment_records/%<id>s/report_payment_attempt", { id: CGI.escape(id) }), | ||
params: params, | ||
opts: opts | ||
) | ||
end | ||
|
||
# Report that the most recent payment attempt on the specified Payment Record | ||
# was canceled. | ||
def report_payment_attempt_canceled(params = {}, opts = {}) | ||
request_stripe_object( | ||
method: :post, | ||
path: format("/v1/payment_records/%<id>s/report_payment_attempt_canceled", { id: CGI.escape(self["id"]) }), | ||
params: params, | ||
opts: opts | ||
) | ||
end | ||
|
||
# Report that the most recent payment attempt on the specified Payment Record | ||
# was canceled. | ||
def self.report_payment_attempt_canceled(id, params = {}, opts = {}) | ||
request_stripe_object( | ||
method: :post, | ||
path: format("/v1/payment_records/%<id>s/report_payment_attempt_canceled", { id: CGI.escape(id) }), | ||
params: params, | ||
opts: opts | ||
) | ||
end | ||
|
||
# Report that the most recent payment attempt on the specified Payment Record | ||
# failed or errored. | ||
def report_payment_attempt_failed(params = {}, opts = {}) | ||
request_stripe_object( | ||
method: :post, | ||
path: format("/v1/payment_records/%<id>s/report_payment_attempt_failed", { id: CGI.escape(self["id"]) }), | ||
params: params, | ||
opts: opts | ||
) | ||
end | ||
|
||
# Report that the most recent payment attempt on the specified Payment Record | ||
# failed or errored. | ||
def self.report_payment_attempt_failed(id, params = {}, opts = {}) | ||
request_stripe_object( | ||
method: :post, | ||
path: format("/v1/payment_records/%<id>s/report_payment_attempt_failed", { id: CGI.escape(id) }), | ||
params: params, | ||
opts: opts | ||
) | ||
end | ||
|
||
# Report that the most recent payment attempt on the specified Payment Record | ||
# was guaranteed. | ||
def report_payment_attempt_guaranteed(params = {}, opts = {}) | ||
request_stripe_object( | ||
method: :post, | ||
path: format("/v1/payment_records/%<id>s/report_payment_attempt_guaranteed", { id: CGI.escape(self["id"]) }), | ||
params: params, | ||
opts: opts | ||
) | ||
end | ||
|
||
# Report that the most recent payment attempt on the specified Payment Record | ||
# was guaranteed. | ||
def self.report_payment_attempt_guaranteed(id, params = {}, opts = {}) | ||
request_stripe_object( | ||
method: :post, | ||
path: format("/v1/payment_records/%<id>s/report_payment_attempt_guaranteed", { id: CGI.escape(id) }), | ||
params: params, | ||
opts: opts | ||
) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
lib/stripe/services/issuing/fraud_liability_debit_service.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# File generated from our OpenAPI spec | ||
# frozen_string_literal: true | ||
|
||
module Stripe | ||
module Issuing | ||
class FraudLiabilityDebitService < StripeService | ||
# 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. | ||
def list(params = {}, opts = {}) | ||
request( | ||
method: :get, | ||
path: "/v1/issuing/fraud_liability_debits", | ||
params: params, | ||
opts: opts, | ||
base_address: :api | ||
) | ||
end | ||
|
||
# Retrieves an Issuing FraudLiabilityDebit object. | ||
def retrieve(fraud_liability_debit, params = {}, opts = {}) | ||
request( | ||
method: :get, | ||
path: format("/v1/issuing/fraud_liability_debits/%<fraud_liability_debit>s", { fraud_liability_debit: CGI.escape(fraud_liability_debit) }), | ||
params: params, | ||
opts: opts, | ||
base_address: :api | ||
) | ||
end | ||
end | ||
end | ||
end |
Oops, something went wrong.