Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated Latest Changes for v2021-02-25 (External Accounts) #836

Merged
merged 1 commit into from
Apr 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions lib/recurly/client/operations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,81 @@ def list_account_credit_payments(account_id:, **options)
pager(path, **options)
end

# List external accounts for an account
#
# {https://developers.recurly.com/api/v2021-02-25#operation/list_account_external_account list_account_external_account api documentation}
#
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
# @param params [Hash] Optional query string parameters:
#
# @return [Pager<Resources::ExternalAccount>] A list of external accounts on an account.
#
def list_account_external_account(account_id:, **options)
path = interpolate_path("/accounts/{account_id}/external_accounts", account_id: account_id)
pager(path, **options)
end

# Create an external account
#
# {https://developers.recurly.com/api/v2021-02-25#operation/create_account_external_account create_account_external_account api documentation}
#
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
# @param body [Requests::ExternalAccountCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::ExternalAccountCreate}
# @param params [Hash] Optional query string parameters:
#
# @return [Resources::ExternalAccount] A representation of the created external_account.
#
def create_account_external_account(account_id:, body:, **options)
path = interpolate_path("/accounts/{account_id}/external_accounts", account_id: account_id)
post(path, body, Requests::ExternalAccountCreate, **options)
end

# Get an external account for an account
#
# {https://developers.recurly.com/api/v2021-02-25#operation/get_account_external_account get_account_external_account api documentation}
#
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
# @param external_account_id [String] External account ID, e.g. +s28zov4fw0cb+.
# @param params [Hash] Optional query string parameters:
#
# @return [Resources::ExternalAccount] A external account on an account.
#
def get_account_external_account(account_id:, external_account_id:, **options)
path = interpolate_path("/accounts/{account_id}/external_accounts/{external_account_id}", account_id: account_id, external_account_id: external_account_id)
get(path, **options)
end

# Update an external account
#
# {https://developers.recurly.com/api/v2021-02-25#operation/update_account_external_account update_account_external_account api documentation}
#
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
# @param external_account_id [String] External account ID, e.g. +s28zov4fw0cb+.
# @param body [Requests::ExternalAccountUpdate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::ExternalAccountUpdate}
# @param params [Hash] Optional query string parameters:
#
# @return [Resources::ExternalAccount] A representation of the updated external_account.
#
def update_account_external_account(account_id:, external_account_id:, body:, **options)
path = interpolate_path("/accounts/{account_id}/external_accounts/{external_account_id}", account_id: account_id, external_account_id: external_account_id)
put(path, body, Requests::ExternalAccountUpdate, **options)
end

# Delete an external account for an account
#
# {https://developers.recurly.com/api/v2021-02-25#operation/delete_account_external_account delete_account_external_account api documentation}
#
# @param account_id [String] Account ID or code. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-bob+.
# @param external_account_id [String] External account ID, e.g. +s28zov4fw0cb+.
# @param params [Hash] Optional query string parameters:
#
# @return [Resources::ExternalAccount] Successful Delete
#
def delete_account_external_account(account_id:, external_account_id:, **options)
path = interpolate_path("/accounts/{account_id}/external_accounts/{external_account_id}", account_id: account_id, external_account_id: external_account_id)
delete(path, **options)
end

# List the external invoices on an account
#
# {https://developers.recurly.com/api/v2021-02-25#operation/list_account_external_invoices list_account_external_invoices api documentation}
Expand Down
4 changes: 4 additions & 0 deletions lib/recurly/requests/account_create.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ class AccountCreate < Request
# @return [String] The tax exemption certificate number for the account. If the merchant has an integration for the Vertex tax provider, this optional value will be sent in any tax calculation requests for the account.
define_attribute :exemption_certificate, String

# @!attribute external_accounts
# @return [Array[ExternalAccountCreate]] External Accounts
define_attribute :external_accounts, Array, { :item_type => :ExternalAccountCreate }

# @!attribute first_name
# @return [String]
define_attribute :first_name, String
Expand Down
18 changes: 18 additions & 0 deletions lib/recurly/requests/external_account_create.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# This file is automatically created by Recurly's OpenAPI generation process
# and thus any edits you make by hand will be lost. If you wish to make a
# change to this file, please create a Github issue explaining the changes you
# need and we will usher them to the appropriate places.
module Recurly
module Requests
class ExternalAccountCreate < Request

# @!attribute external_account_code
# @return [String] Represents the account code for the external account.
define_attribute :external_account_code, String

# @!attribute external_connection_type
# @return [String] Represents the connection type. `AppleAppStore` or `GooglePlayStore`
define_attribute :external_connection_type, String
end
end
end
18 changes: 18 additions & 0 deletions lib/recurly/requests/external_account_update.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# This file is automatically created by Recurly's OpenAPI generation process
# and thus any edits you make by hand will be lost. If you wish to make a
# change to this file, please create a Github issue explaining the changes you
# need and we will usher them to the appropriate places.
module Recurly
module Requests
class ExternalAccountUpdate < Request

# @!attribute external_account_code
# @return [String] Represents the account code for the external account.
define_attribute :external_account_code, String

# @!attribute external_connection_type
# @return [String] Represents the connection type. `AppleAppStore` or `GooglePlayStore`
define_attribute :external_connection_type, String
end
end
end
4 changes: 4 additions & 0 deletions lib/recurly/resources/account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ class Account < Resource
# @return [String] The tax exemption certificate number for the account. If the merchant has an integration for the Vertex tax provider, this optional value will be sent in any tax calculation requests for the account.
define_attribute :exemption_certificate, String

# @!attribute external_accounts
# @return [Array[ExternalAccount]] The external accounts belonging to this account
define_attribute :external_accounts, Array, { :item_type => :ExternalAccount }

# @!attribute first_name
# @return [String]
define_attribute :first_name, String
Expand Down
34 changes: 34 additions & 0 deletions lib/recurly/resources/external_account.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This file is automatically created by Recurly's OpenAPI generation process
# and thus any edits you make by hand will be lost. If you wish to make a
# change to this file, please create a Github issue explaining the changes you
# need and we will usher them to the appropriate places.
module Recurly
module Resources
class ExternalAccount < Resource

# @!attribute created_at
# @return [DateTime] Created at
define_attribute :created_at, DateTime

# @!attribute external_account_code
# @return [String] Represents the account code for the external account.
define_attribute :external_account_code, String

# @!attribute external_connection_type
# @return [String] Represents the connection type. `AppleAppStore` or `GooglePlayStore`
define_attribute :external_connection_type, String

# @!attribute id
# @return [String] UUID of the external_account .
define_attribute :id, String

# @!attribute object
# @return [String]
define_attribute :object, String

# @!attribute updated_at
# @return [DateTime] Last updated at
define_attribute :updated_at, DateTime
end
end
end
Loading