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 Dec 14, 2024
1 parent f45bbdf commit 35b59a8
Show file tree
Hide file tree
Showing 19 changed files with 718 additions and 17 deletions.
31 changes: 30 additions & 1 deletion lib/recurly/client/operations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2382,7 +2382,21 @@ def deactivate_external_product_external_product_reference(external_product_id:,
delete(path, **options)
end

# List a site's external subscriptions
# Create an external subscription
#
# {https://developers.recurly.com/api/v2021-02-25#operation/create_external_subscription create_external_subscription api documentation}
#
# @param body [Requests::ExternalSubscriptionCreate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::ExternalSubscriptionCreate}
# @param params [Hash] Optional query string parameters:
#
# @return [Resources::ExternalSubscription] Returns the external subscription
#
def create_external_subscription(body:, **options)
path = "/external_subscriptions"
post(path, body, Requests::ExternalSubscriptionCreate, **options)
end

# List the external subscriptions on a site
#
# {https://developers.recurly.com/api/v2021-02-25#operation/list_external_subscriptions list_external_subscriptions api documentation}
#
Expand Down Expand Up @@ -2413,6 +2427,21 @@ def get_external_subscription(external_subscription_id:, **options)
get(path, **options)
end

# Update an external subscription
#
# {https://developers.recurly.com/api/v2021-02-25#operation/put_external_subscription put_external_subscription api documentation}
#
# @param external_subscription_id [String] External subscription id
# @param params [Hash] Optional query string parameters:
# :body [Requests::ExternalSubscriptionUpdate] The Hash representing the JSON request to send to the server. It should conform to the schema of {Requests::ExternalSubscriptionUpdate}
#
# @return [Resources::ExternalSubscription] Settings for an external subscription.
#
def put_external_subscription(external_subscription_id:, **options)
path = interpolate_path("/external_subscriptions/{external_subscription_id}", external_subscription_id: external_subscription_id)
put(path, options[:body], Requests::ExternalSubscriptionUpdate, **options)
end

# List the external invoices on an external subscription
#
# {https://developers.recurly.com/api/v2021-02-25#operation/list_external_subscription_external_invoices list_external_subscription_external_invoices api documentation}
Expand Down
14 changes: 14 additions & 0 deletions lib/recurly/requests/account_external_subscription.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# 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 AccountExternalSubscription < Request

# @!attribute account_code
# @return [String] The account code of a new or existing account to be used when creating the external subscription.
define_attribute :account_code, String
end
end
end
2 changes: 1 addition & 1 deletion lib/recurly/requests/external_account_create.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class ExternalAccountCreate < Request
define_attribute :external_account_code, String

# @!attribute external_connection_type
# @return [String] Represents the connection type. `AppleAppStore` or `GooglePlayStore`
# @return [String] Represents the connection type. One of the connection types of your enabled App Connectors
define_attribute :external_connection_type, String
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/recurly/requests/external_account_update.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class ExternalAccountUpdate < Request
define_attribute :external_account_code, String

# @!attribute external_connection_type
# @return [String] Represents the connection type. `AppleAppStore` or `GooglePlayStore`
# @return [String] Represents the connection type. One of the connection types of your enabled App Connectors
define_attribute :external_connection_type, String
end
end
Expand Down
4 changes: 2 additions & 2 deletions lib/recurly/requests/external_product_reference_base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ module Requests
class ExternalProductReferenceBase < Request

# @!attribute external_connection_type
# @return [String]
define_attribute :external_connection_type, String
# @return [ExternalProductReferenceConnectionType] Represents the connection type. One of the connection types of your enabled App Connectors
define_attribute :external_connection_type, :ExternalProductReferenceConnectionType

# @!attribute reference_code
# @return [String] A code which associates the external product to a corresponding object or resource in an external platform like the Apple App Store or Google Play Store.
Expand Down
10 changes: 10 additions & 0 deletions lib/recurly/requests/external_product_reference_connection_type.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# 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 ExternalProductReferenceConnectionType < Request
end
end
end
4 changes: 2 additions & 2 deletions lib/recurly/requests/external_product_reference_create.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ module Requests
class ExternalProductReferenceCreate < Request

# @!attribute external_connection_type
# @return [String]
define_attribute :external_connection_type, String
# @return [ExternalProductReferenceConnectionType] Represents the connection type. One of the connection types of your enabled App Connectors
define_attribute :external_connection_type, :ExternalProductReferenceConnectionType

# @!attribute reference_code
# @return [String] A code which associates the external product to a corresponding object or resource in an external platform like the Apple App Store or Google Play Store.
Expand Down
18 changes: 18 additions & 0 deletions lib/recurly/requests/external_product_reference_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 ExternalProductReferenceUpdate < Request

# @!attribute external_connection_type
# @return [ExternalProductReferenceConnectionType] Represents the connection type. One of the connection types of your enabled App Connectors
define_attribute :external_connection_type, :ExternalProductReferenceConnectionType

# @!attribute reference_code
# @return [String] A code which associates the external product to a corresponding object or resource in an external platform like the Apple App Store or Google Play Store.
define_attribute :reference_code, String
end
end
end
62 changes: 62 additions & 0 deletions lib/recurly/requests/external_subscription_create.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# 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 ExternalSubscriptionCreate < Request

# @!attribute account
# @return [AccountExternalSubscription]
define_attribute :account, :AccountExternalSubscription

# @!attribute activated_at
# @return [DateTime] When the external subscription was activated in the external platform.
define_attribute :activated_at, DateTime

# @!attribute app_identifier
# @return [String] Identifier of the app that generated the external subscription.
define_attribute :app_identifier, String

# @!attribute auto_renew
# @return [Boolean] An indication of whether or not the external subscription will auto-renew at the expiration date.
define_attribute :auto_renew, :Boolean

# @!attribute expires_at
# @return [DateTime] When the external subscription expires in the external platform.
define_attribute :expires_at, DateTime

# @!attribute external_id
# @return [String] Id of the subscription in the external system, i.e. Apple App Store or Google Play Store.
define_attribute :external_id, String

# @!attribute external_product_reference
# @return [ExternalProductReferenceCreate]
define_attribute :external_product_reference, :ExternalProductReferenceCreate

# @!attribute imported
# @return [Boolean] An indication of whether or not the external subscription was being created by a historical data import.
define_attribute :imported, :Boolean

# @!attribute last_purchased
# @return [DateTime] When a new billing event occurred on the external subscription in conjunction with a recent billing period, reactivation or upgrade/downgrade.
define_attribute :last_purchased, DateTime

# @!attribute quantity
# @return [Integer] An indication of the quantity of a subscribed item's quantity.
define_attribute :quantity, Integer

# @!attribute state
# @return [String] External subscriptions can be active, canceled, expired, past_due, voided, revoked, or paused.
define_attribute :state, String

# @!attribute trial_ends_at
# @return [DateTime] When the external subscription trial period ends in the external platform.
define_attribute :trial_ends_at, DateTime

# @!attribute trial_started_at
# @return [DateTime] When the external subscription trial period started in the external platform.
define_attribute :trial_started_at, DateTime
end
end
end
58 changes: 58 additions & 0 deletions lib/recurly/requests/external_subscription_update.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# 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 ExternalSubscriptionUpdate < Request

# @!attribute activated_at
# @return [DateTime] When the external subscription was activated in the external platform.
define_attribute :activated_at, DateTime

# @!attribute app_identifier
# @return [String] Identifier of the app that generated the external subscription.
define_attribute :app_identifier, String

# @!attribute auto_renew
# @return [Boolean] An indication of whether or not the external subscription will auto-renew at the expiration date.
define_attribute :auto_renew, :Boolean

# @!attribute expires_at
# @return [DateTime] When the external subscription expires in the external platform.
define_attribute :expires_at, DateTime

# @!attribute external_id
# @return [String] Id of the subscription in the external system, i.e. Apple App Store or Google Play Store.
define_attribute :external_id, String

# @!attribute external_product_reference
# @return [ExternalProductReferenceUpdate]
define_attribute :external_product_reference, :ExternalProductReferenceUpdate

# @!attribute imported
# @return [Boolean] An indication of whether or not the external subscription was being created by a historical data import.
define_attribute :imported, :Boolean

# @!attribute last_purchased
# @return [DateTime] When a new billing event occurred on the external subscription in conjunction with a recent billing period, reactivation or upgrade/downgrade.
define_attribute :last_purchased, DateTime

# @!attribute quantity
# @return [Integer] An indication of the quantity of a subscribed item's quantity.
define_attribute :quantity, Integer

# @!attribute state
# @return [String] External subscriptions can be active, canceled, expired, past_due, voided, revoked, or paused.
define_attribute :state, String

# @!attribute trial_ends_at
# @return [DateTime] When the external subscription trial period ends in the external platform.
define_attribute :trial_ends_at, DateTime

# @!attribute trial_started_at
# @return [DateTime] When the external subscription trial period started in the external platform.
define_attribute :trial_started_at, DateTime
end
end
end
8 changes: 8 additions & 0 deletions lib/recurly/requests/invoice_create.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ module Recurly
module Requests
class InvoiceCreate < Request

# @!attribute business_entity_code
# @return [String] The `business_entity_code` is the value that represents a specific business entity for an end customer which will be assigned to the invoice. Available when the `Multiple Business Entities` feature is enabled. If both `business_entity_id` and `business_entity_code` are present, `business_entity_id` will be used.
define_attribute :business_entity_code, String

# @!attribute business_entity_id
# @return [String] The `business_entity_id` is the value that represents a specific business entity for an end customer which will be assigned to the invoice. Available when the `Multiple Business Entities` feature is enabled. If both `business_entity_id` and `business_entity_code` are present, `business_entity_id` will be used.
define_attribute :business_entity_id, String

# @!attribute charge_customer_notes
# @return [String] This will default to the Customer Notes text specified on the Invoice Settings for charge invoices. Specify custom notes to add or override Customer Notes on charge invoices.
define_attribute :charge_customer_notes, String
Expand Down
12 changes: 12 additions & 0 deletions lib/recurly/requests/purchase_create.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ class PurchaseCreate < Request
# @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_code
# @return [String] The `business_entity_code` is the value that represents a specific business entity for an end customer. When `business_entity_code` is used to assign a business entity to the subscription, all future billing events for the subscription will bill to the specified business entity. Available when the `Multiple Business Entities` feature is enabled. If both `business_entity_id` and `business_entity_code` are present, `business_entity_id` will be used.
define_attribute :business_entity_code, String

# @!attribute business_entity_id
# @return [String] The `business_entity_id` is the value that represents a specific business entity for an end customer. When `business_entity_id` is used to assign a business entity to the subscription, all future billing events for the subscription will bill to the specified business entity. Available when the `Multiple Business Entities` feature is enabled. If both `business_entity_id` and `business_entity_code` are present, `business_entity_id` will be used.
define_attribute :business_entity_id, String

# @!attribute collection_method
# @return [String] Must be set to manual in order to preview a purchase for an Account that does not have payment information associated with the Billing Info.
define_attribute :collection_method, String
Expand Down Expand Up @@ -70,6 +78,10 @@ class PurchaseCreate < Request
# @return [String] Terms and conditions to be put on the purchase invoice.
define_attribute :terms_and_conditions, String

# @!attribute transaction
# @return [Hash] (Transaction Data, Card on File) - Options for flagging transactions as Customer or Merchant Initiated Unscheduled.
define_attribute :transaction, Hash

# @!attribute transaction_type
# @return [String] An optional type designation for the payment gateway transaction created by this request. Supports 'moto' value, which is the acronym for mail order and telephone transactions.
define_attribute :transaction_type, String
Expand Down
8 changes: 8 additions & 0 deletions lib/recurly/requests/subscription_change_create.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ class SubscriptionChangeCreate < Request
# @return [SubscriptionChangeBillingInfoCreate]
define_attribute :billing_info, :SubscriptionChangeBillingInfoCreate

# @!attribute business_entity_code
# @return [String] The `business_entity_code` is the value that represents a specific business entity for an end customer. When `business_entity_code` is used to assign a business entity to the subscription, all future billing events for the subscription will bill to the specified business entity. Available when the `Multiple Business Entities` feature is enabled. If both `business_entity_id` and `business_entity_code` are present, `business_entity_id` will be used. Only allowed if the `timeframe` is not `now`.
define_attribute :business_entity_code, String

# @!attribute business_entity_id
# @return [String] The `business_entity_id` is the value that represents a specific business entity for an end customer. When `business_entity_id` is used to assign a business entity to the subscription, all future billing events for the subscription will bill to the specified business entity. Available when the `Multiple Business Entities` feature is enabled. If both `business_entity_id` and `business_entity_code` are present, `business_entity_id` will be used. Only allowed if the `timeframe` is not `now`.
define_attribute :business_entity_id, String

# @!attribute collection_method
# @return [String] Collection method
define_attribute :collection_method, String
Expand Down
8 changes: 8 additions & 0 deletions lib/recurly/requests/subscription_create.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ class SubscriptionCreate < Request
# @return [Boolean] Optional field to be used only when needing to bypass the 60 second limit on creating subscriptions. Should only be used when creating subscriptions in bulk from the API.
define_attribute :bulk, :Boolean

# @!attribute business_entity_code
# @return [String] The `business_entity_code` is the value that represents a specific business entity for an end customer. When `business_entity_code` is used to assign a business entity to the subscription, all future billing events for the subscription will bill to the specified business entity. Available when the `Multiple Business Entities` feature is enabled. If both `business_entity_id` and `business_entity_code` are present, `business_entity_id` will be used.
define_attribute :business_entity_code, String

# @!attribute business_entity_id
# @return [String] The `business_entity_id` is the value that represents a specific business entity for an end customer. When `business_entity_id` is used to assign a business entity to the subscription, all future billing events for the subscription will bill to the specified business entity. Available when the `Multiple Business Entities` feature is enabled. If both `business_entity_id` and `business_entity_code` are present, `business_entity_id` will be used.
define_attribute :business_entity_id, String

# @!attribute collection_method
# @return [String] Collection method
define_attribute :collection_method, String
Expand Down
26 changes: 26 additions & 0 deletions lib/recurly/resources/business_entity_mini.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# 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 BusinessEntityMini < Resource

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

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

# @!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
end
end
end
Loading

0 comments on commit 35b59a8

Please sign in to comment.