Skip to content

Commit

Permalink
Generated Latest Changes for v2021-02-25
Browse files Browse the repository at this point in the history
  • Loading branch information
Recurly Integrations authored Jun 1, 2023
1 parent be266f0 commit 885d7df
Show file tree
Hide file tree
Showing 8 changed files with 348 additions and 0 deletions.
71 changes: 71 additions & 0 deletions lib/recurly/client/operations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4470,6 +4470,33 @@ def list_account_external_subscriptions(account_id:, **options)
pager(path, **options)
end

# Fetch a business entity
#
# {https://developers.recurly.com/api/v2021-02-25#operation/get_business_entity get_business_entity api documentation}
#
# @param business_entity_id [String] Business Entity ID. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-entity1+.
# @param params [Hash] Optional query string parameters:
#
# @return [Resources::BusinessEntity] Business entity details
#
def get_business_entity(business_entity_id:, **options)
path = interpolate_path("/business_entities/{business_entity_id}", business_entity_id: business_entity_id)
get(path, **options)
end

# List business entities
#
# {https://developers.recurly.com/api/v2021-02-25#operation/list_business_entities list_business_entities api documentation}
#
# @param params [Hash] Optional query string parameters:
#
# @return [Pager<Resources::BusinessEntity>] List of all business entities on your site.
#
def list_business_entities(**options)
path = "/business_entities"
pager(path, **options)
end

# List gift cards
#
# {https://developers.recurly.com/api/v2021-02-25#operation/list_gift_cards list_gift_cards api documentation}
Expand Down Expand Up @@ -4539,5 +4566,49 @@ def redeem_gift_card(redemption_code:, body:, **options)
path = interpolate_path("/gift_cards/{redemption_code}/redeem", redemption_code: redemption_code)
post(path, body, Requests::GiftCardRedeem, **options)
end

# List a business entity's invoices
#
# {https://developers.recurly.com/api/v2021-02-25#operation/list_business_entity_invoices list_business_entity_invoices api documentation}
#
# @param business_entity_id [String] Business Entity ID. For ID no prefix is used e.g. +e28zov4fw0v2+. For code use prefix +code-+, e.g. +code-entity1+.
# @param params [Hash] Optional query string parameters:
# :ids [String] Filter results by their IDs. Up to 200 IDs can be passed at once using
# commas as separators, e.g. +ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6+.
#
# *Important notes:*
#
# * The +ids+ parameter cannot be used with any other ordering or filtering
# parameters (+limit+, +order+, +sort+, +begin_time+, +end_time+, etc)
# * Invalid or unknown IDs will be ignored, so you should check that the
# results correspond to your request.
# * Records are returned in an arbitrary order. Since results are all
# returned at once you can sort the records yourself.
#
# :limit [Integer] Limit number of records 1-200.
# :order [String] Sort order.
# :sort [String] Sort field. You *really* only want to sort by +updated_at+ in ascending
# order. In descending order updated records will move behind the cursor and could
# prevent some records from being returned.
#
# :begin_time [DateTime] Inclusively filter by begin_time when +sort=created_at+ or +sort=updated_at+.
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
#
# :end_time [DateTime] Inclusively filter by end_time when +sort=created_at+ or +sort=updated_at+.
# *Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
#
# :type [String] Filter by type when:
# - +type=charge+, only charge invoices will be returned.
# - +type=credit+, only credit invoices will be returned.
# - +type=non-legacy+, only charge and credit invoices will be returned.
# - +type=legacy+, only legacy invoices will be returned.
#
#
# @return [Pager<Resources::Invoice>] A list of the business entity's invoices.
#
def list_business_entity_invoices(business_entity_id:, **options)
path = interpolate_path("/business_entities/{business_entity_id}/invoices", business_entity_id: business_entity_id)
pager(path, **options)
end
end
end
4 changes: 4 additions & 0 deletions lib/recurly/requests/account_create.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ class AccountCreate < Request
# @return [String]
define_attribute :last_name, String

# @!attribute override_business_entity_id
# @return [String] Unique ID to identify the business entity assigned to the account. Available when the `Multiple Business Entities` feature is enabled.
define_attribute :override_business_entity_id, String

# @!attribute parent_account_code
# @return [String] The account code of the parent account to be associated with this account. Passing an empty value removes any existing parent association from this account. If both `parent_account_code` and `parent_account_id` are passed, the non-blank value in `parent_account_id` will be used. Only one level of parent child relationship is allowed. You cannot assign a parent account that itself has a parent account.
define_attribute :parent_account_code, String
Expand Down
4 changes: 4 additions & 0 deletions lib/recurly/requests/account_purchase.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ class AccountPurchase < Request
# @return [String]
define_attribute :last_name, String

# @!attribute override_business_entity_id
# @return [String] Unique ID to identify the business entity assigned to the account. Available when the `Multiple Business Entities` feature is enabled.
define_attribute :override_business_entity_id, String

# @!attribute parent_account_code
# @return [String] The account code of the parent account to be associated with this account. Passing an empty value removes any existing parent association from this account. If both `parent_account_code` and `parent_account_id` are passed, the non-blank value in `parent_account_id` will be used. Only one level of parent child relationship is allowed. You cannot assign a parent account that itself has a parent account.
define_attribute :parent_account_code, String
Expand Down
4 changes: 4 additions & 0 deletions lib/recurly/requests/account_update.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ class AccountUpdate < Request
# @return [String]
define_attribute :last_name, String

# @!attribute override_business_entity_id
# @return [String] Unique ID to identify the business entity assigned to the account. Available when the `Multiple Business Entities` feature is enabled.
define_attribute :override_business_entity_id, String

# @!attribute parent_account_code
# @return [String] The account code of the parent account to be associated with this account. Passing an empty value removes any existing parent association from this account. If both `parent_account_code` and `parent_account_id` are passed, the non-blank value in `parent_account_id` will be used. Only one level of parent child relationship is allowed. You cannot assign a parent account that itself has a parent account.
define_attribute :parent_account_code, String
Expand Down
4 changes: 4 additions & 0 deletions lib/recurly/resources/account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ class Account < Resource
# @return [String] Object type
define_attribute :object, String

# @!attribute override_business_entity_id
# @return [String] Unique ID to identify the business entity assigned to the account. Available when the `Multiple Business Entities` feature is enabled.
define_attribute :override_business_entity_id, String

# @!attribute parent_account_id
# @return [String] The UUID of the parent account associated with this account.
define_attribute :parent_account_id, String
Expand Down
54 changes: 54 additions & 0 deletions lib/recurly/resources/business_entity.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# 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 BusinessEntity < Resource

# @!attribute code
# @return [String] The entity code of the business entity.
define_attribute :code, String

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

# @!attribute default_registration_number
# @return [String] Registration number for the customer used on the invoice.
define_attribute :default_registration_number, String

# @!attribute default_vat_number
# @return [String] VAT number for the customer used on the invoice.
define_attribute :default_vat_number, String

# @!attribute id
# @return [String] Business entity ID
define_attribute :id, String

# @!attribute invoice_display_address
# @return [Address] Address information for the business entity that will appear on the invoice.
define_attribute :invoice_display_address, :Address

# @!attribute name
# @return [String] This name describes your business entity and will appear on the invoice.
define_attribute :name, String

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

# @!attribute subscriber_location_countries
# @return [Array[String]] List of countries for which the business entity will be used.
define_attribute :subscriber_location_countries, Array, { :item_type => String }

# @!attribute tax_address
# @return [Address] Address information for the business entity that will be used for calculating taxes.
define_attribute :tax_address, :Address

# @!attribute updated_at
# @return [DateTime] Last updated at
define_attribute :updated_at, DateTime
end
end
end
4 changes: 4 additions & 0 deletions lib/recurly/resources/invoice.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ class Invoice < Resource
# @return [String] The `billing_info_id` is the value that represents a specific billing info for an end customer. When `billing_info_id` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info. `billing_info_id` can ONLY be used for sites utilizing the Wallet feature.
define_attribute :billing_info_id, String

# @!attribute business_entity_id
# @return [String] Unique ID to identify the business entity assigned to the invoice. Available when the `Multiple Business Entities` feature is enabled.
define_attribute :business_entity_id, String

# @!attribute closed_at
# @return [DateTime] Date invoice was marked paid or failed.
define_attribute :closed_at, DateTime
Expand Down
Loading

0 comments on commit 885d7df

Please sign in to comment.