-
Notifications
You must be signed in to change notification settings - Fork 552
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
629cd30
commit 8d358b0
Showing
15 changed files
with
1,037 additions
and
51 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
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,13 @@ | ||
# File generated from our OpenAPI spec | ||
# frozen_string_literal: true | ||
|
||
module Stripe | ||
module Treasury | ||
class CreditReversal < APIResource | ||
extend Stripe::APIOperations::Create | ||
extend Stripe::APIOperations::List | ||
|
||
OBJECT_NAME = "treasury.credit_reversal" | ||
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,13 @@ | ||
# File generated from our OpenAPI spec | ||
# frozen_string_literal: true | ||
|
||
module Stripe | ||
module Treasury | ||
class DebitReversal < APIResource | ||
extend Stripe::APIOperations::Create | ||
extend Stripe::APIOperations::List | ||
|
||
OBJECT_NAME = "treasury.debit_reversal" | ||
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,35 @@ | ||
# File generated from our OpenAPI spec | ||
# frozen_string_literal: true | ||
|
||
module Stripe | ||
module Treasury | ||
class FinancialAccount < APIResource | ||
extend Stripe::APIOperations::Create | ||
extend Stripe::APIOperations::List | ||
include Stripe::APIOperations::Save | ||
|
||
OBJECT_NAME = "treasury.financial_account" | ||
|
||
custom_method :retrieve_features, http_verb: :get, http_path: "features" | ||
custom_method :update_features, http_verb: :post, http_path: "features" | ||
|
||
def retrieve_features(params = {}, opts = {}) | ||
request_stripe_object( | ||
method: :get, | ||
path: resource_url + "/features", | ||
params: params, | ||
opts: opts | ||
) | ||
end | ||
|
||
def update_features(params = {}, opts = {}) | ||
request_stripe_object( | ||
method: :post, | ||
path: resource_url + "/features", | ||
params: params, | ||
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,63 @@ | ||
# File generated from our OpenAPI spec | ||
# frozen_string_literal: true | ||
|
||
module Stripe | ||
module Treasury | ||
class InboundTransfer < APIResource | ||
extend Stripe::APIOperations::Create | ||
extend Stripe::APIOperations::List | ||
|
||
OBJECT_NAME = "treasury.inbound_transfer" | ||
|
||
custom_method :cancel, http_verb: :post | ||
|
||
def cancel(params = {}, opts = {}) | ||
request_stripe_object( | ||
method: :post, | ||
path: resource_url + "/cancel", | ||
params: params, | ||
opts: opts | ||
) | ||
end | ||
|
||
def test_helpers | ||
TestHelpers.new(self) | ||
end | ||
|
||
class TestHelpers < APIResourceTestHelpers | ||
RESOURCE_CLASS = InboundTransfer | ||
|
||
custom_method :fail, http_verb: :post | ||
custom_method :return_inbound_transfer, http_verb: :post, http_path: "return" | ||
custom_method :succeed, http_verb: :post | ||
|
||
def fail(params = {}, opts = {}) | ||
@resource.request_stripe_object( | ||
method: :post, | ||
path: resource_url + "/fail", | ||
params: params, | ||
opts: opts | ||
) | ||
end | ||
|
||
def return_inbound_transfer(params = {}, opts = {}) | ||
@resource.request_stripe_object( | ||
method: :post, | ||
path: resource_url + "/return", | ||
params: params, | ||
opts: opts | ||
) | ||
end | ||
|
||
def succeed(params = {}, opts = {}) | ||
@resource.request_stripe_object( | ||
method: :post, | ||
path: resource_url + "/succeed", | ||
params: params, | ||
opts: opts | ||
) | ||
end | ||
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,63 @@ | ||
# File generated from our OpenAPI spec | ||
# frozen_string_literal: true | ||
|
||
module Stripe | ||
module Treasury | ||
class OutboundPayment < APIResource | ||
extend Stripe::APIOperations::Create | ||
extend Stripe::APIOperations::List | ||
|
||
OBJECT_NAME = "treasury.outbound_payment" | ||
|
||
custom_method :cancel, http_verb: :post | ||
|
||
def cancel(params = {}, opts = {}) | ||
request_stripe_object( | ||
method: :post, | ||
path: resource_url + "/cancel", | ||
params: params, | ||
opts: opts | ||
) | ||
end | ||
|
||
def test_helpers | ||
TestHelpers.new(self) | ||
end | ||
|
||
class TestHelpers < APIResourceTestHelpers | ||
RESOURCE_CLASS = OutboundPayment | ||
|
||
custom_method :fail, http_verb: :post | ||
custom_method :post, http_verb: :post | ||
custom_method :return_outbound_payment, http_verb: :post, http_path: "return" | ||
|
||
def fail(params = {}, opts = {}) | ||
@resource.request_stripe_object( | ||
method: :post, | ||
path: resource_url + "/fail", | ||
params: params, | ||
opts: opts | ||
) | ||
end | ||
|
||
def post(params = {}, opts = {}) | ||
@resource.request_stripe_object( | ||
method: :post, | ||
path: resource_url + "/post", | ||
params: params, | ||
opts: opts | ||
) | ||
end | ||
|
||
def return_outbound_payment(params = {}, opts = {}) | ||
@resource.request_stripe_object( | ||
method: :post, | ||
path: resource_url + "/return", | ||
params: params, | ||
opts: opts | ||
) | ||
end | ||
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,63 @@ | ||
# File generated from our OpenAPI spec | ||
# frozen_string_literal: true | ||
|
||
module Stripe | ||
module Treasury | ||
class OutboundTransfer < APIResource | ||
extend Stripe::APIOperations::Create | ||
extend Stripe::APIOperations::List | ||
|
||
OBJECT_NAME = "treasury.outbound_transfer" | ||
|
||
custom_method :cancel, http_verb: :post | ||
|
||
def cancel(params = {}, opts = {}) | ||
request_stripe_object( | ||
method: :post, | ||
path: resource_url + "/cancel", | ||
params: params, | ||
opts: opts | ||
) | ||
end | ||
|
||
def test_helpers | ||
TestHelpers.new(self) | ||
end | ||
|
||
class TestHelpers < APIResourceTestHelpers | ||
RESOURCE_CLASS = OutboundTransfer | ||
|
||
custom_method :fail, http_verb: :post | ||
custom_method :post, http_verb: :post | ||
custom_method :return_outbound_transfer, http_verb: :post, http_path: "return" | ||
|
||
def fail(params = {}, opts = {}) | ||
@resource.request_stripe_object( | ||
method: :post, | ||
path: resource_url + "/fail", | ||
params: params, | ||
opts: opts | ||
) | ||
end | ||
|
||
def post(params = {}, opts = {}) | ||
@resource.request_stripe_object( | ||
method: :post, | ||
path: resource_url + "/post", | ||
params: params, | ||
opts: opts | ||
) | ||
end | ||
|
||
def return_outbound_transfer(params = {}, opts = {}) | ||
@resource.request_stripe_object( | ||
method: :post, | ||
path: resource_url + "/return", | ||
params: params, | ||
opts: opts | ||
) | ||
end | ||
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,30 @@ | ||
# File generated from our OpenAPI spec | ||
# frozen_string_literal: true | ||
|
||
module Stripe | ||
module Treasury | ||
class ReceivedCredit < APIResource | ||
extend Stripe::APIOperations::List | ||
|
||
OBJECT_NAME = "treasury.received_credit" | ||
|
||
def test_helpers | ||
TestHelpers.new(self) | ||
end | ||
|
||
class TestHelpers < APIResourceTestHelpers | ||
RESOURCE_CLASS = ReceivedCredit | ||
|
||
def self.create(params = {}, opts = {}) | ||
resp, opts = execute_resource_request( | ||
:post, | ||
resource_url + "/received_credits", | ||
params, | ||
opts | ||
) | ||
Util.convert_to_stripe_object(resp.data, opts) | ||
end | ||
end | ||
end | ||
end | ||
end |
Oops, something went wrong.