Class: Recurly::Client
- Inherits:
-
Object
- Object
- Recurly::Client
- Defined in:
- lib/recurly/client.rb,
lib/recurly/client/operations.rb
Constant Summary collapse
- API_HOSTS =
{ us: "https://v3.recurly.com", eu: "https://v3.eu.recurly.com", }
- REGION =
:us
- CA_FILE =
File.join(File.dirname(__FILE__), "../data/ca-certificates.crt")
- BINARY_TYPES =
[ "application/pdf", ].freeze
- JSON_CONTENT_TYPE =
"application/json"
- MAX_RETRIES =
3
- LOG_LEVELS =
%i(debug info warn error fatal).freeze
- BASE36_ALPHABET =
(("0".."9").to_a + ("a".."z").to_a).freeze
- ALLOWED_OPTIONS =
[ :site_id, :open_timeout, :read_timeout, :body, :params, :headers, ].freeze
Class Attribute Summary collapse
Instance Method Summary collapse
- #api_version ⇒ Object
-
#apply_credit_balance(invoice_id:, **options) ⇒ Resources::Invoice
Apply available credit to a pending or past due charge invoice.
-
#cancel_subscription(subscription_id:, **options) ⇒ Resources::Subscription
Cancel a subscription.
-
#cancelPurchase(transaction_id:, **options) ⇒ Resources::InvoiceCollection
Cancel Purchase.
-
#collect_invoice(invoice_id:, **options) ⇒ Resources::Invoice
Collect a pending or past due, automatic invoice.
-
#convert_trial(subscription_id:, **options) ⇒ Resources::Subscription
Convert trial subscription.
-
#create_account(body:, **options) ⇒ Resources::Account
Create an account.
-
#create_account_external_account(account_id:, body:, **options) ⇒ Resources::ExternalAccount
Create an external account.
-
#create_authorize_purchase(body:, **options) ⇒ Resources::InvoiceCollection
Authorize a purchase.
-
#create_billing_info(account_id:, body:, **options) ⇒ Resources::BillingInfo
Add new billing information on an account.
-
#create_capture_purchase(transaction_id:, **options) ⇒ Resources::InvoiceCollection
Capture a purchase.
-
#create_coupon(body:, **options) ⇒ Resources::Coupon
Create a new coupon.
-
#create_coupon_redemption(account_id:, body:, **options) ⇒ Resources::CouponRedemption
Generate an active coupon redemption on an account or subscription.
-
#create_external_invoice(external_subscription_id:, body:, **options) ⇒ Resources::ExternalInvoice
Create an external invoice.
-
#create_external_product(body:, **options) ⇒ Resources::ExternalProduct
Create an external product.
-
#create_external_product_external_product_reference(external_product_id:, body:, **options) ⇒ Resources::ExternalProductReferenceMini
Create an external product reference on an external product.
-
#create_external_subscription(body:, **options) ⇒ Resources::ExternalSubscription
Create an external subscription.
-
#create_general_ledger_account(body:, **options) ⇒ Resources::GeneralLedgerAccount
Create a new general ledger account.
-
#create_gift_card(body:, **options) ⇒ Resources::GiftCard
Create gift card.
-
#create_invoice(account_id:, body:, **options) ⇒ Resources::InvoiceCollection
Create an invoice for pending line items.
-
#create_item(body:, **options) ⇒ Resources::Item
Create a new item.
-
#create_line_item(account_id:, body:, **options) ⇒ Resources::LineItem
Create a new line item for the account.
-
#create_measured_unit(body:, **options) ⇒ Resources::MeasuredUnit
Create a new measured unit.
-
#create_pending_purchase(body:, **options) ⇒ Resources::InvoiceCollection
Create a pending purchase.
-
#create_plan(body:, **options) ⇒ Resources::Plan
Create a plan.
-
#create_plan_add_on(plan_id:, body:, **options) ⇒ Resources::AddOn
Create an add-on.
-
#create_purchase(body:, **options) ⇒ Resources::InvoiceCollection
Create a new purchase.
-
#create_shipping_address(account_id:, body:, **options) ⇒ Resources::ShippingAddress
Create a new shipping address for the account.
-
#create_shipping_method(body:, **options) ⇒ Resources::ShippingMethod
Create a new shipping method.
-
#create_subscription(body:, **options) ⇒ Resources::Subscription
Create a new subscription.
-
#create_subscription_change(subscription_id:, body:, **options) ⇒ Resources::SubscriptionChange
Create a new subscription change.
-
#create_usage(subscription_id:, add_on_id:, body:, **options) ⇒ Resources::Usage
Log a usage record on this subscription add-on.
-
#deactivate_account(account_id:, **options) ⇒ Resources::Account
Deactivate an account.
-
#deactivate_coupon(coupon_id:, **options) ⇒ Resources::Coupon
Expire a coupon.
-
#deactivate_external_product_external_product_reference(external_product_id:, external_product_reference_id:, **options) ⇒ Resources::ExternalProductReferenceMini
Deactivate an external product reference.
-
#deactivate_external_products(external_product_id:, **options) ⇒ Resources::ExternalProduct
Deactivate an external product.
-
#deactivate_item(item_id:, **options) ⇒ Resources::Item
Deactivate an item.
-
#deactivate_shipping_method(shipping_method_id:, **options) ⇒ Resources::ShippingMethod
Deactivate a shipping method.
-
#deactivate_unique_coupon_code(unique_coupon_code_id:, **options) ⇒ Resources::UniqueCouponCode
Deactivate a unique coupon code.
-
#delete_account_external_account(account_id:, external_account_id:, **options) ⇒ Resources::ExternalAccount
Delete an external account for an account.
-
#generate_unique_coupon_codes(coupon_id:, body:, **options) ⇒ Resources::UniqueCouponCodeParams
Generate unique coupon codes.
-
#get_a_billing_info(account_id:, billing_info_id:, **options) ⇒ Resources::BillingInfo
Fetch a billing info.
-
#get_account(account_id:, **options) ⇒ Resources::Account
Fetch an account.
-
#get_account_acquisition(account_id:, **options) ⇒ Resources::AccountAcquisition
Fetch an account's acquisition data.
-
#get_account_balance(account_id:, **options) ⇒ Resources::AccountBalance
Fetch an account's balance and past due status.
-
#get_account_external_account(account_id:, external_account_id:, **options) ⇒ Resources::ExternalAccount
Get an external account for an account.
-
#get_account_note(account_id:, account_note_id:, **options) ⇒ Resources::AccountNote
Fetch an account note.
-
#get_add_on(add_on_id:, **options) ⇒ Resources::AddOn
Fetch an add-on.
-
#get_billing_info(account_id:, **options) ⇒ Resources::BillingInfo
Fetch an account's billing information.
-
#get_business_entity(business_entity_id:, **options) ⇒ Resources::BusinessEntity
Fetch a business entity.
-
#get_coupon(coupon_id:, **options) ⇒ Resources::Coupon
Fetch a coupon.
-
#get_credit_payment(credit_payment_id:, **options) ⇒ Resources::CreditPayment
Fetch a credit payment.
-
#get_custom_field_definition(custom_field_definition_id:, **options) ⇒ Resources::CustomFieldDefinition
Fetch an custom field definition.
-
#get_dunning_campaign(dunning_campaign_id:, **options) ⇒ Resources::DunningCampaign
Fetch a dunning campaign.
-
#get_export_dates(**options) ⇒ Resources::ExportDates
List the dates that have an available export to download.
-
#get_export_files(export_date:, **options) ⇒ Resources::ExportFiles
List of the export files that are available to download.
-
#get_external_product(external_product_id:, **options) ⇒ Resources::ExternalProduct
Fetch an external product.
-
#get_external_product_external_product_reference(external_product_id:, external_product_reference_id:, **options) ⇒ Resources::ExternalProductReferenceMini
Fetch an external product reference.
-
#get_external_subscription(external_subscription_id:, **options) ⇒ Resources::ExternalSubscription
Fetch an external subscription.
-
#get_external_subscription_external_payment_phase(external_subscription_id:, external_payment_phase_id:, **options) ⇒ Resources::ExternalPaymentPhase
Fetch an external payment phase.
-
#get_general_ledger_account(general_ledger_account_id:, **options) ⇒ Resources::GeneralLedgerAccount
Fetch a general ledger account.
-
#get_gift_card(gift_card_id:, **options) ⇒ Resources::GiftCard
Fetch a gift card.
-
#get_invoice(invoice_id:, **options) ⇒ Resources::Invoice
Fetch an invoice.
-
#get_invoice_pdf(invoice_id:, **options) ⇒ Resources::BinaryFile
Fetch an invoice as a PDF.
-
#get_invoice_template(invoice_template_id:, **options) ⇒ Resources::InvoiceTemplate
Fetch an invoice template.
-
#get_item(item_id:, **options) ⇒ Resources::Item
Fetch an item.
-
#get_line_item(line_item_id:, **options) ⇒ Resources::LineItem
Fetch a line item.
-
#get_measured_unit(measured_unit_id:, **options) ⇒ Resources::MeasuredUnit
Fetch a measured unit.
-
#get_performance_obligation(performance_obligation_id:, **options) ⇒ Resources::PerformanceObligation
Get a single Performance Obligation.
-
#get_performance_obligations(**options) ⇒ Pager<Resources::PerformanceObligation>
Get a site's Performance Obligations.
-
#get_plan(plan_id:, **options) ⇒ Resources::Plan
Fetch a plan.
-
#get_plan_add_on(plan_id:, add_on_id:, **options) ⇒ Resources::AddOn
Fetch a plan's add-on.
-
#get_preview_renewal(subscription_id:, **options) ⇒ Resources::InvoiceCollection
Fetch a preview of a subscription's renewal invoice(s).
-
#get_shipping_address(account_id:, shipping_address_id:, **options) ⇒ Resources::ShippingAddress
Fetch an account's shipping address.
-
#get_shipping_method(shipping_method_id:, **options) ⇒ Resources::ShippingMethod
Fetch a shipping method.
-
#get_site(site_id:, **options) ⇒ Resources::Site
Fetch a site.
-
#get_subscription(subscription_id:, **options) ⇒ Resources::Subscription
Fetch a subscription.
-
#get_subscription_change(subscription_id:, **options) ⇒ Resources::SubscriptionChange
Fetch a subscription's pending change.
-
#get_transaction(transaction_id:, **options) ⇒ Resources::Transaction
Fetch a transaction.
-
#get_unique_coupon_code(unique_coupon_code_id:, **options) ⇒ Resources::UniqueCouponCode
Fetch a unique coupon code.
-
#get_usage(usage_id:, **options) ⇒ Resources::Usage
Get a usage record.
-
#initialize(region: REGION, base_url: , ca_file: CA_FILE, api_key:, logger: nil, keep_alive_timeout: 600) {|_self| ... } ⇒ Client
constructor
Initialize a client.
-
#list_account_acquisition(**options) ⇒ Pager<Resources::AccountAcquisition>
List a site's account acquisition data.
-
#list_account_coupon_redemptions(account_id:, **options) ⇒ Pager<Resources::CouponRedemption>
List the coupon redemptions for an account.
-
#list_account_credit_payments(account_id:, **options) ⇒ Pager<Resources::CreditPayment>
List an account's credit payments.
-
#list_account_external_account(account_id:, **options) ⇒ Pager<Resources::ExternalAccount>
List external accounts for an account.
-
#list_account_external_invoices(account_id:, **options) ⇒ Pager<Resources::ExternalInvoice>
List the external invoices on an account.
-
#list_account_external_subscriptions(account_id:, **options) ⇒ Pager<Resources::ExternalSubscription>
List an account's external subscriptions.
-
#list_account_invoices(account_id:, **options) ⇒ Pager<Resources::Invoice>
List an account's invoices.
-
#list_account_line_items(account_id:, **options) ⇒ Pager<Resources::LineItem>
List an account's line items.
-
#list_account_notes(account_id:, **options) ⇒ Pager<Resources::AccountNote>
List an account's notes.
-
#list_account_subscriptions(account_id:, **options) ⇒ Pager<Resources::Subscription>
List an account's subscriptions.
-
#list_account_transactions(account_id:, **options) ⇒ Pager<Resources::Transaction>
List an account's transactions.
-
#list_accounts(**options) ⇒ Pager<Resources::Account>
List a site's accounts.
-
#list_active_coupon_redemptions(account_id:, **options) ⇒ Pager<Resources::CouponRedemption>
List the coupon redemptions that are active on an account.
-
#list_add_ons(**options) ⇒ Pager<Resources::AddOn>
List a site's add-ons.
-
#list_billing_infos(account_id:, **options) ⇒ Pager<Resources::BillingInfo>
Get the list of billing information associated with an account.
-
#list_business_entities(**options) ⇒ Pager<Resources::BusinessEntity>
List business entities.
-
#list_business_entity_invoices(business_entity_id:, **options) ⇒ Pager<Resources::Invoice>
List a business entity's invoices.
-
#list_child_accounts(account_id:, **options) ⇒ Pager<Resources::Account>
List an account's child accounts.
-
#list_coupons(**options) ⇒ Pager<Resources::Coupon>
List a site's coupons.
-
#list_credit_payments(**options) ⇒ Pager<Resources::CreditPayment>
List a site's credit payments.
-
#list_custom_field_definitions(**options) ⇒ Pager<Resources::CustomFieldDefinition>
List a site's custom field definitions.
-
#list_dunning_campaigns(**options) ⇒ Pager<Resources::DunningCampaign>
List the dunning campaigns for a site.
-
#list_entitlements(account_id:, **options) ⇒ Pager<Resources::Entitlements>
List entitlements granted to an account.
-
#list_external_invoices(**options) ⇒ Pager<Resources::ExternalInvoice>
List the external invoices on a site.
-
#list_external_product_external_product_references(external_product_id:, **options) ⇒ Pager<Resources::ExternalProductReferenceCollection>
List the external product references for an external product.
-
#list_external_products(**options) ⇒ Pager<Resources::ExternalProduct>
List a site's external products.
-
#list_external_subscription_external_invoices(external_subscription_id:, **options) ⇒ Pager<Resources::ExternalInvoice>
List the external invoices on an external subscription.
-
#list_external_subscription_external_payment_phases(external_subscription_id:, **options) ⇒ Pager<Resources::ExternalPaymentPhase>
List the external payment phases on an external subscription.
-
#list_external_subscriptions(**options) ⇒ Pager<Resources::ExternalSubscription>
List the external subscriptions on a site.
-
#list_general_ledger_accounts(**options) ⇒ Pager<Resources::GeneralLedgerAccount>
List a site's general ledger accounts.
-
#list_gift_cards(**options) ⇒ Pager<Resources::GiftCard>
List gift cards.
-
#list_invoice_coupon_redemptions(invoice_id:, **options) ⇒ Pager<Resources::CouponRedemption>
List the coupon redemptions applied to an invoice.
-
#list_invoice_line_items(invoice_id:, **options) ⇒ Pager<Resources::LineItem>
List an invoice's line items.
-
#list_invoice_template_accounts(invoice_template_id:, **options) ⇒ Pager<Resources::Account>
List an invoice template's associated accounts.
-
#list_invoice_templates(**options) ⇒ Pager<Resources::InvoiceTemplate>
Show the invoice templates for a site.
-
#list_invoices(**options) ⇒ Pager<Resources::Invoice>
List a site's invoices.
-
#list_items(**options) ⇒ Pager<Resources::Item>
List a site's items.
-
#list_line_items(**options) ⇒ Pager<Resources::LineItem>
List a site's line items.
-
#list_measured_unit(**options) ⇒ Pager<Resources::MeasuredUnit>
List a site's measured units.
-
#list_plan_add_ons(plan_id:, **options) ⇒ Pager<Resources::AddOn>
List a plan's add-ons.
-
#list_plans(**options) ⇒ Pager<Resources::Plan>
List a site's plans.
-
#list_related_invoices(invoice_id:, **options) ⇒ Pager<Resources::Invoice>
List an invoice's related credit or charge invoices.
-
#list_shipping_addresses(account_id:, **options) ⇒ Pager<Resources::ShippingAddress>
Fetch a list of an account's shipping addresses.
-
#list_shipping_methods(**options) ⇒ Pager<Resources::ShippingMethod>
List a site's shipping methods.
-
#list_sites(**options) ⇒ Pager<Resources::Site>
List sites.
-
#list_subscription_coupon_redemptions(subscription_id:, **options) ⇒ Pager<Resources::CouponRedemption>
List the coupon redemptions for a subscription.
-
#list_subscription_invoices(subscription_id:, **options) ⇒ Pager<Resources::Invoice>
List a subscription's invoices.
-
#list_subscription_line_items(subscription_id:, **options) ⇒ Pager<Resources::LineItem>
List a subscription's line items.
-
#list_subscriptions(**options) ⇒ Pager<Resources::Subscription>
List a site's subscriptions.
-
#list_transactions(**options) ⇒ Pager<Resources::Transaction>
List a site's transactions.
-
#list_unique_coupon_codes(coupon_id:, **options) ⇒ Pager<Resources::UniqueCouponCode>
List unique coupon codes associated with a bulk coupon.
-
#list_usage(subscription_id:, add_on_id:, **options) ⇒ Pager<Resources::Usage>
List a subscription add-on's usage records.
-
#mark_invoice_failed(invoice_id:, **options) ⇒ Resources::Invoice
Mark an open invoice as failed.
-
#mark_invoice_successful(invoice_id:, **options) ⇒ Resources::Invoice
Mark an open invoice as successful.
-
#pause_subscription(subscription_id:, body:, **options) ⇒ Resources::Subscription
Pause subscription.
-
#preview_gift_card(body:, **options) ⇒ Resources::GiftCard
Preview gift card.
-
#preview_invoice(account_id:, body:, **options) ⇒ Resources::InvoiceCollection
Preview new invoice for pending line items.
-
#preview_purchase(body:, **options) ⇒ Resources::InvoiceCollection
Preview a new purchase.
-
#preview_subscription_change(subscription_id:, body:, **options) ⇒ Resources::SubscriptionChange
Preview a new subscription change.
-
#put_dunning_campaign_bulk_update(dunning_campaign_id:, body:, **options) ⇒ Resources::DunningCampaignsBulkUpdateResponse
Assign a dunning campaign to multiple plans.
-
#put_external_subscription(external_subscription_id:, **options) ⇒ Resources::ExternalSubscription
Update an external subscription.
-
#reactivate_account(account_id:, **options) ⇒ Resources::Account
Reactivate an inactive account.
-
#reactivate_item(item_id:, **options) ⇒ Resources::Item
Reactivate an inactive item.
-
#reactivate_subscription(subscription_id:, **options) ⇒ Resources::Subscription
Reactivate a canceled subscription.
-
#reactivate_unique_coupon_code(unique_coupon_code_id:, **options) ⇒ Resources::UniqueCouponCode
Restore a unique coupon code.
-
#record_external_transaction(invoice_id:, body:, **options) ⇒ Resources::Transaction
Record an external payment for a manual invoices.
-
#redeem_gift_card(redemption_code:, body:, **options) ⇒ Resources::GiftCard
Redeem gift card.
-
#refund_invoice(invoice_id:, body:, **options) ⇒ Resources::Invoice
Refund an invoice.
-
#remove_a_billing_info(account_id:, billing_info_id:, **options) ⇒ Resources::Empty
Remove an account's billing information.
-
#remove_account_acquisition(account_id:, **options) ⇒ Resources::Empty
Remove an account's acquisition data.
-
#remove_billing_info(account_id:, **options) ⇒ Resources::Empty
Remove an account's billing information.
-
#remove_coupon_redemption(account_id:, **options) ⇒ Resources::CouponRedemption
Delete the active coupon redemption from an account.
-
#remove_line_item(line_item_id:, **options) ⇒ Resources::Empty
Delete an uninvoiced line item.
-
#remove_measured_unit(measured_unit_id:, **options) ⇒ Resources::MeasuredUnit
Remove a measured unit.
-
#remove_plan(plan_id:, **options) ⇒ Resources::Plan
Remove a plan.
-
#remove_plan_add_on(plan_id:, add_on_id:, **options) ⇒ Resources::AddOn
Remove an add-on.
-
#remove_shipping_address(account_id:, shipping_address_id:, **options) ⇒ Resources::Empty
Remove an account's shipping address.
-
#remove_subscription_change(subscription_id:, **options) ⇒ Resources::Empty
Delete the pending subscription change.
-
#remove_usage(usage_id:, **options) ⇒ Resources::Empty
Delete a usage record.
-
#reopen_invoice(invoice_id:, **options) ⇒ Resources::Invoice
Reopen a closed, manual invoice.
-
#restore_coupon(coupon_id:, body:, **options) ⇒ Resources::Coupon
Restore an inactive coupon.
-
#resume_subscription(subscription_id:, **options) ⇒ Resources::Subscription
Resume subscription.
-
#show_external_invoice(external_invoice_id:, **options) ⇒ Resources::ExternalInvoice
Fetch an external invoice.
-
#terminate_subscription(subscription_id:, **options) ⇒ Resources::Subscription
Terminate a subscription.
-
#update_a_billing_info(account_id:, billing_info_id:, body:, **options) ⇒ Resources::BillingInfo
Update an account's billing information.
-
#update_account(account_id:, body:, **options) ⇒ Resources::Account
Update an account.
-
#update_account_acquisition(account_id:, body:, **options) ⇒ Resources::AccountAcquisition
Update an account's acquisition data.
-
#update_account_external_account(account_id:, external_account_id:, body:, **options) ⇒ Resources::ExternalAccount
Update an external account.
-
#update_billing_info(account_id:, body:, **options) ⇒ Resources::BillingInfo
Set an account's billing information.
-
#update_coupon(coupon_id:, body:, **options) ⇒ Resources::Coupon
Update an active coupon.
-
#update_external_product(external_product_id:, body:, **options) ⇒ Resources::ExternalProduct
Update an external product.
-
#update_general_ledger_account(general_ledger_account_id:, body:, **options) ⇒ Resources::GeneralLedgerAccount
Update a general ledger account.
-
#update_invoice(invoice_id:, body:, **options) ⇒ Resources::Invoice
Update an invoice.
-
#update_item(item_id:, body:, **options) ⇒ Resources::Item
Update an active item.
-
#update_measured_unit(measured_unit_id:, body:, **options) ⇒ Resources::MeasuredUnit
Update a measured unit.
-
#update_plan(plan_id:, body:, **options) ⇒ Resources::Plan
Update a plan.
-
#update_plan_add_on(plan_id:, add_on_id:, body:, **options) ⇒ Resources::AddOn
Update an add-on.
-
#update_shipping_address(account_id:, shipping_address_id:, body:, **options) ⇒ Resources::ShippingAddress
Update an account's shipping address.
-
#update_shipping_method(shipping_method_id:, body:, **options) ⇒ Resources::ShippingMethod
Update an active Shipping Method.
-
#update_subscription(subscription_id:, body:, **options) ⇒ Resources::Subscription
Update a subscription.
-
#update_usage(usage_id:, body:, **options) ⇒ Resources::Usage
Update a usage record.
-
#verify_billing_info(account_id:, **options) ⇒ Resources::Transaction
Verify an account's credit card billing information.
-
#verify_billing_info_cvv(account_id:, body:, **options) ⇒ Resources::Transaction
Verify an account's credit card billing cvv.
-
#void_invoice(invoice_id:, **options) ⇒ Resources::Invoice
Void a credit invoice.
Constructor Details
#initialize(region: REGION, base_url: , ca_file: CA_FILE, api_key:, logger: nil, keep_alive_timeout: 600) {|_self| ... } ⇒ Client
Initialize a client. It requires an API key.
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/recurly/client.rb', line 64 def initialize(region: REGION, base_url: API_HOSTS[:us], ca_file: CA_FILE, api_key:, logger: nil, keep_alive_timeout: 600) raise ArgumentError, "'api_key' must be set to a non-nil value" if api_key.nil? raise ArgumentError, "Invalid region type. Expected one of: #{API_HOSTS.keys.join(", ")}" if !API_HOSTS.key?(region) base_url = API_HOSTS[region] if base_url == API_HOSTS[:us] && API_HOSTS.key?(region) set_api_key(api_key) (base_url, ca_file, keep_alive_timeout) if logger.nil? @logger = Logger.new(STDOUT).tap do |l| l.level = Logger::WARN end else unless LOG_LEVELS.all? { |lev| logger.respond_to?(lev) } raise ArgumentError, "You must pass in a logger implementation that responds to the following messages: #{LOG_LEVELS}" end @logger = logger end if @logger.level < Logger::INFO msg = <<-MSG The Recurly logger should not be initialized beyond the level INFO. It is currently configured to emit headers and request / response bodies. This has the potential to leak PII and other sensitive information and should never be used in production. MSG log_warn("SECURITY_WARNING", message: msg) end # execute block with this client if given yield(self) if block_given? end |
Class Attribute Details
.connection_pool ⇒ Recurly::ConnectionPool
171 172 173 |
# File 'lib/recurly/client.rb', line 171 def connection_pool @connection_pool end |
Instance Method Details
#api_version ⇒ Object
7 8 9 |
# File 'lib/recurly/client/operations.rb', line 7 def api_version "v2021-02-25" end |
#apply_credit_balance(invoice_id:, **options) ⇒ Resources::Invoice
Apply available credit to a pending or past due charge invoice
2629 2630 2631 2632 |
# File 'lib/recurly/client/operations.rb', line 2629 def apply_credit_balance(invoice_id:, **) path = interpolate_path("/invoices/{invoice_id}/apply_credit_balance", invoice_id: invoice_id) put(path, **) end |
#cancel_subscription(subscription_id:, **options) ⇒ Resources::Subscription
Cancel a subscription
3719 3720 3721 3722 |
# File 'lib/recurly/client/operations.rb', line 3719 def cancel_subscription(subscription_id:, **) path = interpolate_path("/subscriptions/{subscription_id}/cancel", subscription_id: subscription_id) put(path, [:body], Requests::SubscriptionCancel, **) end |
#cancelPurchase(transaction_id:, **options) ⇒ Resources::InvoiceCollection
Cancel Purchase
4464 4465 4466 4467 |
# File 'lib/recurly/client/operations.rb', line 4464 def cancelPurchase(transaction_id:, **) path = interpolate_path("/purchases/{transaction_id}/cancel/", transaction_id: transaction_id) post(path, **) end |
#collect_invoice(invoice_id:, **options) ⇒ Resources::Invoice
Collect a pending or past due, automatic invoice
2653 2654 2655 2656 |
# File 'lib/recurly/client/operations.rb', line 2653 def collect_invoice(invoice_id:, **) path = interpolate_path("/invoices/{invoice_id}/collect", invoice_id: invoice_id) put(path, [:body], Requests::InvoiceCollect, **) end |
#convert_trial(subscription_id:, **options) ⇒ Resources::Subscription
Convert trial subscription
3813 3814 3815 3816 |
# File 'lib/recurly/client/operations.rb', line 3813 def convert_trial(subscription_id:, **) path = interpolate_path("/subscriptions/{subscription_id}/convert_trial", subscription_id: subscription_id) put(path, **) end |
#create_account(body:, **options) ⇒ Resources::Account
Create an account
169 170 171 172 |
# File 'lib/recurly/client/operations.rb', line 169 def create_account(body:, **) path = "/accounts" post(path, body, Requests::AccountCreate, **) end |
#create_account_external_account(account_id:, body:, **options) ⇒ Resources::ExternalAccount
Create an external account
777 778 779 780 |
# File 'lib/recurly/client/operations.rb', line 777 def create_account_external_account(account_id:, body:, **) path = interpolate_path("/accounts/{account_id}/external_accounts", account_id: account_id) post(path, body, Requests::ExternalAccountCreate, **) end |
#create_authorize_purchase(body:, **options) ⇒ Resources::InvoiceCollection
Authorize a purchase
4436 4437 4438 4439 |
# File 'lib/recurly/client/operations.rb', line 4436 def (body:, **) path = "/purchases/authorize" post(path, body, Requests::PurchaseCreate, **) end |
#create_billing_info(account_id:, body:, **options) ⇒ Resources::BillingInfo
Add new billing information on an account
541 542 543 544 |
# File 'lib/recurly/client/operations.rb', line 541 def create_billing_info(account_id:, body:, **) path = interpolate_path("/accounts/{account_id}/billing_infos", account_id: account_id) post(path, body, Requests::BillingInfoCreate, **) end |
#create_capture_purchase(transaction_id:, **options) ⇒ Resources::InvoiceCollection
Capture a purchase
4450 4451 4452 4453 |
# File 'lib/recurly/client/operations.rb', line 4450 def create_capture_purchase(transaction_id:, **) path = interpolate_path("/purchases/{transaction_id}/capture", transaction_id: transaction_id) post(path, **) end |
#create_coupon(body:, **options) ⇒ Resources::Coupon
Create a new coupon
1563 1564 1565 1566 |
# File 'lib/recurly/client/operations.rb', line 1563 def create_coupon(body:, **) path = "/coupons" post(path, body, Requests::CouponCreate, **) end |
#create_coupon_redemption(account_id:, body:, **options) ⇒ Resources::CouponRedemption
Generate an active coupon redemption on an account or subscription
688 689 690 691 |
# File 'lib/recurly/client/operations.rb', line 688 def create_coupon_redemption(account_id:, body:, **) path = interpolate_path("/accounts/{account_id}/coupon_redemptions/active", account_id: account_id) post(path, body, Requests::CouponRedemptionCreate, **) end |
#create_external_invoice(external_subscription_id:, body:, **options) ⇒ Resources::ExternalInvoice
Create an external invoice
2476 2477 2478 2479 |
# File 'lib/recurly/client/operations.rb', line 2476 def create_external_invoice(external_subscription_id:, body:, **) path = interpolate_path("/external_subscriptions/{external_subscription_id}/external_invoices", external_subscription_id: external_subscription_id) post(path, body, Requests::ExternalInvoiceCreate, **) end |
#create_external_product(body:, **options) ⇒ Resources::ExternalProduct
Create an external product
2275 2276 2277 2278 |
# File 'lib/recurly/client/operations.rb', line 2275 def create_external_product(body:, **) path = "/external_products" post(path, body, Requests::ExternalProductCreate, **) end |
#create_external_product_external_product_reference(external_product_id:, body:, **options) ⇒ Resources::ExternalProductReferenceMini
Create an external product reference on an external product
create_external_product_external_product_reference api documentation
2351 2352 2353 2354 |
# File 'lib/recurly/client/operations.rb', line 2351 def create_external_product_external_product_reference(external_product_id:, body:, **) path = interpolate_path("/external_products/{external_product_id}/external_product_references", external_product_id: external_product_id) post(path, body, Requests::ExternalProductReferenceCreate, **) end |
#create_external_subscription(body:, **options) ⇒ Resources::ExternalSubscription
Create an external subscription
2395 2396 2397 2398 |
# File 'lib/recurly/client/operations.rb', line 2395 def create_external_subscription(body:, **) path = "/external_subscriptions" post(path, body, Requests::ExternalSubscriptionCreate, **) end |
#create_general_ledger_account(body:, **options) ⇒ Resources::GeneralLedgerAccount
Create a new general ledger account
1837 1838 1839 1840 |
# File 'lib/recurly/client/operations.rb', line 1837 def create_general_ledger_account(body:, **) path = "/general_ledger_accounts" post(path, body, Requests::GeneralLedgerAccountCreate, **) end |
#create_gift_card(body:, **options) ⇒ Resources::GiftCard
Create gift card
4749 4750 4751 4752 |
# File 'lib/recurly/client/operations.rb', line 4749 def create_gift_card(body:, **) path = "/gift_cards" post(path, body, Requests::GiftCardCreate, **) end |
#create_invoice(account_id:, body:, **options) ⇒ Resources::InvoiceCollection
Create an invoice for pending line items
930 931 932 933 |
# File 'lib/recurly/client/operations.rb', line 930 def create_invoice(account_id:, body:, **) path = interpolate_path("/accounts/{account_id}/invoices", account_id: account_id) post(path, body, Requests::InvoiceCreate, **) end |
#create_item(body:, **options) ⇒ Resources::Item
Create a new item
2049 2050 2051 2052 |
# File 'lib/recurly/client/operations.rb', line 2049 def create_item(body:, **) path = "/items" post(path, body, Requests::ItemCreate, **) end |
#create_line_item(account_id:, body:, **options) ⇒ Resources::LineItem
Create a new line item for the account
1045 1046 1047 1048 |
# File 'lib/recurly/client/operations.rb', line 1045 def create_line_item(account_id:, body:, **) path = interpolate_path("/accounts/{account_id}/line_items", account_id: account_id) post(path, body, Requests::LineItemCreate, **) end |
#create_measured_unit(body:, **options) ⇒ Resources::MeasuredUnit
Create a new measured unit
2201 2202 2203 2204 |
# File 'lib/recurly/client/operations.rb', line 2201 def create_measured_unit(body:, **) path = "/measured_units" post(path, body, Requests::MeasuredUnitCreate, **) end |
#create_pending_purchase(body:, **options) ⇒ Resources::InvoiceCollection
Create a pending purchase
4422 4423 4424 4425 |
# File 'lib/recurly/client/operations.rb', line 4422 def create_pending_purchase(body:, **) path = "/purchases/pending" post(path, body, Requests::PurchaseCreate, **) end |
#create_plan(body:, **options) ⇒ Resources::Plan
Create a plan
3099 3100 3101 3102 |
# File 'lib/recurly/client/operations.rb', line 3099 def create_plan(body:, **) path = "/plans" post(path, body, Requests::PlanCreate, **) end |
#create_plan_add_on(plan_id:, body:, **options) ⇒ Resources::AddOn
Create an add-on
3257 3258 3259 3260 |
# File 'lib/recurly/client/operations.rb', line 3257 def create_plan_add_on(plan_id:, body:, **) path = interpolate_path("/plans/{plan_id}/add_ons", plan_id: plan_id) post(path, body, Requests::AddOnCreate, **) end |
#create_purchase(body:, **options) ⇒ Resources::InvoiceCollection
Create a new purchase
4340 4341 4342 4343 |
# File 'lib/recurly/client/operations.rb', line 4340 def create_purchase(body:, **) path = "/purchases" post(path, body, Requests::PurchaseCreate, **) end |
#create_shipping_address(account_id:, body:, **options) ⇒ Resources::ShippingAddress
Create a new shipping address for the account
1189 1190 1191 1192 |
# File 'lib/recurly/client/operations.rb', line 1189 def create_shipping_address(account_id:, body:, **) path = interpolate_path("/accounts/{account_id}/shipping_addresses", account_id: account_id) post(path, body, Requests::ShippingAddressCreate, **) end |
#create_shipping_method(body:, **options) ⇒ Resources::ShippingMethod
Create a new shipping method
3474 3475 3476 3477 |
# File 'lib/recurly/client/operations.rb', line 3474 def create_shipping_method(body:, **) path = "/shipping_methods" post(path, body, Requests::ShippingMethodCreate, **) end |
#create_subscription(body:, **options) ⇒ Resources::Subscription
Create a new subscription
3601 3602 3603 3604 |
# File 'lib/recurly/client/operations.rb', line 3601 def create_subscription(body:, **) path = "/subscriptions" post(path, body, Requests::SubscriptionCreate, **) end |
#create_subscription_change(subscription_id:, body:, **options) ⇒ Resources::SubscriptionChange
Create a new subscription change
3894 3895 3896 3897 |
# File 'lib/recurly/client/operations.rb', line 3894 def create_subscription_change(subscription_id:, body:, **) path = interpolate_path("/subscriptions/{subscription_id}/change", subscription_id: subscription_id) post(path, body, Requests::SubscriptionChangeCreate, **) end |
#create_usage(subscription_id:, add_on_id:, body:, **options) ⇒ Resources::Usage
Log a usage record on this subscription add-on
4145 4146 4147 4148 |
# File 'lib/recurly/client/operations.rb', line 4145 def create_usage(subscription_id:, add_on_id:, body:, **) path = interpolate_path("/subscriptions/{subscription_id}/add_ons/{add_on_id}/usage", subscription_id: subscription_id, add_on_id: add_on_id) post(path, body, Requests::UsageCreate, **) end |
#deactivate_account(account_id:, **options) ⇒ Resources::Account
Deactivate an account
246 247 248 249 |
# File 'lib/recurly/client/operations.rb', line 246 def deactivate_account(account_id:, **) path = interpolate_path("/accounts/{account_id}", account_id: account_id) delete(path, **) end |
#deactivate_coupon(coupon_id:, **options) ⇒ Resources::Coupon
Expire a coupon
1636 1637 1638 1639 |
# File 'lib/recurly/client/operations.rb', line 1636 def deactivate_coupon(coupon_id:, **) path = interpolate_path("/coupons/{coupon_id}", coupon_id: coupon_id) delete(path, **) end |
#deactivate_external_product_external_product_reference(external_product_id:, external_product_reference_id:, **options) ⇒ Resources::ExternalProductReferenceMini
Deactivate an external product reference
deactivate_external_product_external_product_reference api documentation
2381 2382 2383 2384 |
# File 'lib/recurly/client/operations.rb', line 2381 def deactivate_external_product_external_product_reference(external_product_id:, external_product_reference_id:, **) path = interpolate_path("/external_products/{external_product_id}/external_product_references/{external_product_reference_id}", external_product_id: external_product_id, external_product_reference_id: external_product_reference_id) delete(path, **) end |
#deactivate_external_products(external_product_id:, **options) ⇒ Resources::ExternalProduct
Deactivate an external product
2318 2319 2320 2321 |
# File 'lib/recurly/client/operations.rb', line 2318 def deactivate_external_products(external_product_id:, **) path = interpolate_path("/external_products/{external_product_id}", external_product_id: external_product_id) delete(path, **) end |
#deactivate_item(item_id:, **options) ⇒ Resources::Item
Deactivate an item
2126 2127 2128 2129 |
# File 'lib/recurly/client/operations.rb', line 2126 def deactivate_item(item_id:, **) path = interpolate_path("/items/{item_id}", item_id: item_id) delete(path, **) end |
#deactivate_shipping_method(shipping_method_id:, **options) ⇒ Resources::ShippingMethod
Deactivate a shipping method
3517 3518 3519 3520 |
# File 'lib/recurly/client/operations.rb', line 3517 def deactivate_shipping_method(shipping_method_id:, **) path = interpolate_path("/shipping_methods/{shipping_method_id}", shipping_method_id: shipping_method_id) delete(path, **) end |
#deactivate_unique_coupon_code(unique_coupon_code_id:, **options) ⇒ Resources::UniqueCouponCode
Deactivate a unique coupon code
4286 4287 4288 4289 |
# File 'lib/recurly/client/operations.rb', line 4286 def deactivate_unique_coupon_code(unique_coupon_code_id:, **) path = interpolate_path("/unique_coupon_codes/{unique_coupon_code_id}", unique_coupon_code_id: unique_coupon_code_id) delete(path, **) end |
#delete_account_external_account(account_id:, external_account_id:, **options) ⇒ Resources::ExternalAccount
Delete an external account for an account
823 824 825 826 |
# File 'lib/recurly/client/operations.rb', line 823 def delete_account_external_account(account_id:, external_account_id:, **) path = interpolate_path("/accounts/{account_id}/external_accounts/{external_account_id}", account_id: account_id, external_account_id: external_account_id) delete(path, **) end |
#generate_unique_coupon_codes(coupon_id:, body:, **options) ⇒ Resources::UniqueCouponCodeParams
Generate unique coupon codes
1651 1652 1653 1654 |
# File 'lib/recurly/client/operations.rb', line 1651 def generate_unique_coupon_codes(coupon_id:, body:, **) path = interpolate_path("/coupons/{coupon_id}/generate", coupon_id: coupon_id) post(path, body, Requests::CouponBulkCreate, **) end |
#get_a_billing_info(account_id:, billing_info_id:, **options) ⇒ Resources::BillingInfo
Fetch a billing info
556 557 558 559 |
# File 'lib/recurly/client/operations.rb', line 556 def get_a_billing_info(account_id:, billing_info_id:, **) path = interpolate_path("/accounts/{account_id}/billing_infos/{billing_info_id}", account_id: account_id, billing_info_id: billing_info_id) get(path, **) end |
#get_account(account_id:, **options) ⇒ Resources::Account
Fetch an account
192 193 194 195 |
# File 'lib/recurly/client/operations.rb', line 192 def get_account(account_id:, **) path = interpolate_path("/accounts/{account_id}", account_id: account_id) get(path, **) end |
#get_account_acquisition(account_id:, **options) ⇒ Resources::AccountAcquisition
Fetch an account's acquisition data
269 270 271 272 |
# File 'lib/recurly/client/operations.rb', line 269 def get_account_acquisition(account_id:, **) path = interpolate_path("/accounts/{account_id}/acquisition", account_id: account_id) get(path, **) end |
#get_account_balance(account_id:, **options) ⇒ Resources::AccountBalance
Fetch an account's balance and past due status
374 375 376 377 |
# File 'lib/recurly/client/operations.rb', line 374 def get_account_balance(account_id:, **) path = interpolate_path("/accounts/{account_id}/balance", account_id: account_id) get(path, **) end |
#get_account_external_account(account_id:, external_account_id:, **options) ⇒ Resources::ExternalAccount
Get an external account for an account
792 793 794 795 |
# File 'lib/recurly/client/operations.rb', line 792 def get_account_external_account(account_id:, external_account_id:, **) path = interpolate_path("/accounts/{account_id}/external_accounts/{external_account_id}", account_id: account_id, external_account_id: external_account_id) get(path, **) end |
#get_account_note(account_id:, account_note_id:, **options) ⇒ Resources::AccountNote
Fetch an account note
1106 1107 1108 1109 |
# File 'lib/recurly/client/operations.rb', line 1106 def get_account_note(account_id:, account_note_id:, **) path = interpolate_path("/accounts/{account_id}/notes/{account_note_id}", account_id: account_id, account_note_id: account_note_id) get(path, **) end |
#get_add_on(add_on_id:, **options) ⇒ Resources::AddOn
Fetch an add-on
3413 3414 3415 3416 |
# File 'lib/recurly/client/operations.rb', line 3413 def get_add_on(add_on_id:, **) path = interpolate_path("/add_ons/{add_on_id}", add_on_id: add_on_id) get(path, **) end |
#get_billing_info(account_id:, **options) ⇒ Resources::BillingInfo
Fetch an account's billing information
397 398 399 400 |
# File 'lib/recurly/client/operations.rb', line 397 def get_billing_info(account_id:, **) path = interpolate_path("/accounts/{account_id}/billing_info", account_id: account_id) get(path, **) end |
#get_business_entity(business_entity_id:, **options) ⇒ Resources::BusinessEntity
Fetch a business entity
4709 4710 4711 4712 |
# File 'lib/recurly/client/operations.rb', line 4709 def get_business_entity(business_entity_id:, **) path = interpolate_path("/business_entities/{business_entity_id}", business_entity_id: business_entity_id) get(path, **) end |
#get_coupon(coupon_id:, **options) ⇒ Resources::Coupon
Fetch a coupon
1586 1587 1588 1589 |
# File 'lib/recurly/client/operations.rb', line 1586 def get_coupon(coupon_id:, **) path = interpolate_path("/coupons/{coupon_id}", coupon_id: coupon_id) get(path, **) end |
#get_credit_payment(credit_payment_id:, **options) ⇒ Resources::CreditPayment
Fetch a credit payment
1752 1753 1754 1755 |
# File 'lib/recurly/client/operations.rb', line 1752 def get_credit_payment(credit_payment_id:, **) path = interpolate_path("/credit_payments/{credit_payment_id}", credit_payment_id: credit_payment_id) get(path, **) end |
#get_custom_field_definition(custom_field_definition_id:, **options) ⇒ Resources::CustomFieldDefinition
Fetch an custom field definition
1823 1824 1825 1826 |
# File 'lib/recurly/client/operations.rb', line 1823 def get_custom_field_definition(custom_field_definition_id:, **) path = interpolate_path("/custom_field_definitions/{custom_field_definition_id}", custom_field_definition_id: custom_field_definition_id) get(path, **) end |
#get_dunning_campaign(dunning_campaign_id:, **options) ⇒ Resources::DunningCampaign
Fetch a dunning campaign
4544 4545 4546 4547 |
# File 'lib/recurly/client/operations.rb', line 4544 def get_dunning_campaign(dunning_campaign_id:, **) path = interpolate_path("/dunning_campaigns/{dunning_campaign_id}", dunning_campaign_id: dunning_campaign_id) get(path, **) end |
#get_export_dates(**options) ⇒ Resources::ExportDates
List the dates that have an available export to download.
4488 4489 4490 4491 |
# File 'lib/recurly/client/operations.rb', line 4488 def get_export_dates(**) path = "/export_dates" get(path, **) end |
#get_export_files(export_date:, **options) ⇒ Resources::ExportFiles
List of the export files that are available to download.
4513 4514 4515 4516 |
# File 'lib/recurly/client/operations.rb', line 4513 def get_export_files(export_date:, **) path = interpolate_path("/export_dates/{export_date}/export_files", export_date: export_date) get(path, **) end |
#get_external_product(external_product_id:, **options) ⇒ Resources::ExternalProduct
Fetch an external product
2289 2290 2291 2292 |
# File 'lib/recurly/client/operations.rb', line 2289 def get_external_product(external_product_id:, **) path = interpolate_path("/external_products/{external_product_id}", external_product_id: external_product_id) get(path, **) end |
#get_external_product_external_product_reference(external_product_id:, external_product_reference_id:, **options) ⇒ Resources::ExternalProductReferenceMini
Fetch an external product reference
get_external_product_external_product_reference api documentation
2366 2367 2368 2369 |
# File 'lib/recurly/client/operations.rb', line 2366 def get_external_product_external_product_reference(external_product_id:, external_product_reference_id:, **) path = interpolate_path("/external_products/{external_product_id}/external_product_references/{external_product_reference_id}", external_product_id: external_product_id, external_product_reference_id: external_product_reference_id) get(path, **) end |
#get_external_subscription(external_subscription_id:, **options) ⇒ Resources::ExternalSubscription
Fetch an external subscription
2426 2427 2428 2429 |
# File 'lib/recurly/client/operations.rb', line 2426 def get_external_subscription(external_subscription_id:, **) path = interpolate_path("/external_subscriptions/{external_subscription_id}", external_subscription_id: external_subscription_id) get(path, **) end |
#get_external_subscription_external_payment_phase(external_subscription_id:, external_payment_phase_id:, **options) ⇒ Resources::ExternalPaymentPhase
Fetch an external payment phase
get_external_subscription_external_payment_phase api documentation
4658 4659 4660 4661 |
# File 'lib/recurly/client/operations.rb', line 4658 def get_external_subscription_external_payment_phase(external_subscription_id:, external_payment_phase_id:, **) path = interpolate_path("/external_subscriptions/{external_subscription_id}/external_payment_phases/{external_payment_phase_id}", external_subscription_id: external_subscription_id, external_payment_phase_id: external_payment_phase_id) get(path, **) end |
#get_general_ledger_account(general_ledger_account_id:, **options) ⇒ Resources::GeneralLedgerAccount
Fetch a general ledger account
1883 1884 1885 1886 |
# File 'lib/recurly/client/operations.rb', line 1883 def get_general_ledger_account(general_ledger_account_id:, **) path = interpolate_path("/general_ledger_accounts/{general_ledger_account_id}", general_ledger_account_id: general_ledger_account_id) get(path, **) end |
#get_gift_card(gift_card_id:, **options) ⇒ Resources::GiftCard
Fetch a gift card
4763 4764 4765 4766 |
# File 'lib/recurly/client/operations.rb', line 4763 def get_gift_card(gift_card_id:, **) path = interpolate_path("/gift_cards/{gift_card_id}", gift_card_id: gift_card_id) get(path, **) end |
#get_invoice(invoice_id:, **options) ⇒ Resources::Invoice
Fetch an invoice
2551 2552 2553 2554 |
# File 'lib/recurly/client/operations.rb', line 2551 def get_invoice(invoice_id:, **) path = interpolate_path("/invoices/{invoice_id}", invoice_id: invoice_id) get(path, **) end |
#get_invoice_pdf(invoice_id:, **options) ⇒ Resources::BinaryFile
Fetch an invoice as a PDF
2605 2606 2607 2608 |
# File 'lib/recurly/client/operations.rb', line 2605 def get_invoice_pdf(invoice_id:, **) path = interpolate_path("/invoices/{invoice_id}.pdf", invoice_id: invoice_id) get(path, **) end |
#get_invoice_template(invoice_template_id:, **options) ⇒ Resources::InvoiceTemplate
Fetch an invoice template
4590 4591 4592 4593 |
# File 'lib/recurly/client/operations.rb', line 4590 def get_invoice_template(invoice_template_id:, **) path = interpolate_path("/invoice_templates/{invoice_template_id}", invoice_template_id: invoice_template_id) get(path, **) end |
#get_item(item_id:, **options) ⇒ Resources::Item
Fetch an item
2072 2073 2074 2075 |
# File 'lib/recurly/client/operations.rb', line 2072 def get_item(item_id:, **) path = interpolate_path("/items/{item_id}", item_id: item_id) get(path, **) end |
#get_line_item(line_item_id:, **options) ⇒ Resources::LineItem
Fetch a line item
2988 2989 2990 2991 |
# File 'lib/recurly/client/operations.rb', line 2988 def get_line_item(line_item_id:, **) path = interpolate_path("/line_items/{line_item_id}", line_item_id: line_item_id) get(path, **) end |
#get_measured_unit(measured_unit_id:, **options) ⇒ Resources::MeasuredUnit
Fetch a measured unit
2215 2216 2217 2218 |
# File 'lib/recurly/client/operations.rb', line 2215 def get_measured_unit(measured_unit_id:, **) path = interpolate_path("/measured_units/{measured_unit_id}", measured_unit_id: measured_unit_id) get(path, **) end |
#get_performance_obligation(performance_obligation_id:, **options) ⇒ Resources::PerformanceObligation
Get a single Performance Obligation.
1912 1913 1914 1915 |
# File 'lib/recurly/client/operations.rb', line 1912 def get_performance_obligation(performance_obligation_id:, **) path = interpolate_path("/performance_obligations/{performance_obligation_id}", performance_obligation_id: performance_obligation_id) get(path, **) end |
#get_performance_obligations(**options) ⇒ Pager<Resources::PerformanceObligation>
Get a site's Performance Obligations
1925 1926 1927 1928 |
# File 'lib/recurly/client/operations.rb', line 1925 def get_performance_obligations(**) path = "/performance_obligations" pager(path, **) end |
#get_plan(plan_id:, **options) ⇒ Resources::Plan
Fetch a plan
3122 3123 3124 3125 |
# File 'lib/recurly/client/operations.rb', line 3122 def get_plan(plan_id:, **) path = interpolate_path("/plans/{plan_id}", plan_id: plan_id) get(path, **) end |
#get_plan_add_on(plan_id:, add_on_id:, **options) ⇒ Resources::AddOn
Fetch a plan's add-on
3283 3284 3285 3286 |
# File 'lib/recurly/client/operations.rb', line 3283 def get_plan_add_on(plan_id:, add_on_id:, **) path = interpolate_path("/plans/{plan_id}/add_ons/{add_on_id}", plan_id: plan_id, add_on_id: add_on_id) get(path, **) end |
#get_preview_renewal(subscription_id:, **options) ⇒ Resources::InvoiceCollection
Fetch a preview of a subscription's renewal invoice(s)
3838 3839 3840 3841 |
# File 'lib/recurly/client/operations.rb', line 3838 def get_preview_renewal(subscription_id:, **) path = interpolate_path("/subscriptions/{subscription_id}/preview_renewal", subscription_id: subscription_id) get(path, **) end |
#get_shipping_address(account_id:, shipping_address_id:, **options) ⇒ Resources::ShippingAddress
Fetch an account's shipping address
1216 1217 1218 1219 |
# File 'lib/recurly/client/operations.rb', line 1216 def get_shipping_address(account_id:, shipping_address_id:, **) path = interpolate_path("/accounts/{account_id}/shipping_addresses/{shipping_address_id}", account_id: account_id, shipping_address_id: shipping_address_id) get(path, **) end |
#get_shipping_method(shipping_method_id:, **options) ⇒ Resources::ShippingMethod
Fetch a shipping method
3488 3489 3490 3491 |
# File 'lib/recurly/client/operations.rb', line 3488 def get_shipping_method(shipping_method_id:, **) path = interpolate_path("/shipping_methods/{shipping_method_id}", shipping_method_id: shipping_method_id) get(path, **) end |
#get_site(site_id:, **options) ⇒ Resources::Site
Fetch a site
69 70 71 72 |
# File 'lib/recurly/client/operations.rb', line 69 def get_site(site_id:, **) path = interpolate_path("/sites/{site_id}", site_id: site_id) get(path, **) end |
#get_subscription(subscription_id:, **options) ⇒ Resources::Subscription
Fetch a subscription
3626 3627 3628 3629 |
# File 'lib/recurly/client/operations.rb', line 3626 def get_subscription(subscription_id:, **) path = interpolate_path("/subscriptions/{subscription_id}", subscription_id: subscription_id) get(path, **) end |
#get_subscription_change(subscription_id:, **options) ⇒ Resources::SubscriptionChange
Fetch a subscription's pending change
3863 3864 3865 3866 |
# File 'lib/recurly/client/operations.rb', line 3863 def get_subscription_change(subscription_id:, **) path = interpolate_path("/subscriptions/{subscription_id}/change", subscription_id: subscription_id) get(path, **) end |
#get_transaction(transaction_id:, **options) ⇒ Resources::Transaction
Fetch a transaction
4258 4259 4260 4261 |
# File 'lib/recurly/client/operations.rb', line 4258 def get_transaction(transaction_id:, **) path = interpolate_path("/transactions/{transaction_id}", transaction_id: transaction_id) get(path, **) end |
#get_unique_coupon_code(unique_coupon_code_id:, **options) ⇒ Resources::UniqueCouponCode
Fetch a unique coupon code
4272 4273 4274 4275 |
# File 'lib/recurly/client/operations.rb', line 4272 def get_unique_coupon_code(unique_coupon_code_id:, **) path = interpolate_path("/unique_coupon_codes/{unique_coupon_code_id}", unique_coupon_code_id: unique_coupon_code_id) get(path, **) end |
#get_usage(usage_id:, **options) ⇒ Resources::Usage
Get a usage record
4159 4160 4161 4162 |
# File 'lib/recurly/client/operations.rb', line 4159 def get_usage(usage_id:, **) path = interpolate_path("/usage/{usage_id}", usage_id: usage_id) get(path, **) end |
#list_account_acquisition(**options) ⇒ Pager<Resources::AccountAcquisition>
List a site's account acquisition data
list_account_acquisition api documentation
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.
1482 1483 1484 1485 |
# File 'lib/recurly/client/operations.rb', line 1482 def list_account_acquisition(**) path = "/acquisitions" pager(path, **) end |
#list_account_coupon_redemptions(account_id:, **options) ⇒ Pager<Resources::CouponRedemption>
List the coupon redemptions for an account
list_account_coupon_redemptions api documentation
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.
: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.
:state [String] Filter by state.
635 636 637 638 |
# File 'lib/recurly/client/operations.rb', line 635 def list_account_coupon_redemptions(account_id:, **) path = interpolate_path("/accounts/{account_id}/coupon_redemptions", account_id: account_id) pager(path, **) end |
#list_account_credit_payments(account_id:, **options) ⇒ Pager<Resources::CreditPayment>
List an account's credit payments
list_account_credit_payments api documentation
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.
748 749 750 751 |
# File 'lib/recurly/client/operations.rb', line 748 def list_account_credit_payments(account_id:, **) path = interpolate_path("/accounts/{account_id}/credit_payments", account_id: account_id) pager(path, **) end |
#list_account_external_account(account_id:, **options) ⇒ Pager<Resources::ExternalAccount>
List external accounts for an account
762 763 764 765 |
# File 'lib/recurly/client/operations.rb', line 762 def list_account_external_account(account_id:, **) path = interpolate_path("/accounts/{account_id}/external_accounts", account_id: account_id) pager(path, **) end |
#list_account_external_invoices(account_id:, **options) ⇒ Pager<Resources::ExternalInvoice>
List the external invoices on an account
list_account_external_invoices api documentation
order. In descending order updated records will move behind the cursor and could
prevent some records from being returned.
:limit [Integer] Limit number of records 1-200.
:order [String] Sort order.
843 844 845 846 |
# File 'lib/recurly/client/operations.rb', line 843 def list_account_external_invoices(account_id:, **) path = interpolate_path("/accounts/{account_id}/external_invoices", account_id: account_id) pager(path, **) end |
#list_account_external_subscriptions(account_id:, **options) ⇒ Pager<Resources::ExternalSubscription>
List an account's external subscriptions
list_account_external_subscriptions api documentation
order. In descending order updated records will move behind the cursor and could
prevent some records from being returned.
4695 4696 4697 4698 |
# File 'lib/recurly/client/operations.rb', line 4695 def list_account_external_subscriptions(account_id:, **) path = interpolate_path("/accounts/{account_id}/external_subscriptions", account_id: account_id) pager(path, **) end |
#list_account_invoices(account_id:, **options) ⇒ Pager<Resources::Invoice>
List an account's invoices
list_account_invoices api documentation
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.
:state [String] Invoice state.
: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.
899 900 901 902 |
# File 'lib/recurly/client/operations.rb', line 899 def list_account_invoices(account_id:, **) path = interpolate_path("/accounts/{account_id}/invoices", account_id: account_id) pager(path, **) end |
#list_account_line_items(account_id:, **options) ⇒ Pager<Resources::LineItem>
List an account's line items
list_account_line_items api documentation
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.
:original [String] Filter by original field.
:state [String] Filter by state field.
:type [String] Filter by type field.
1013 1014 1015 1016 |
# File 'lib/recurly/client/operations.rb', line 1013 def list_account_line_items(account_id:, **) path = interpolate_path("/accounts/{account_id}/line_items", account_id: account_id) pager(path, **) end |
#list_account_notes(account_id:, **options) ⇒ Pager<Resources::AccountNote>
List an account's notes
list_account_notes api documentation
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.
1079 1080 1081 1082 |
# File 'lib/recurly/client/operations.rb', line 1079 def list_account_notes(account_id:, **) path = interpolate_path("/accounts/{account_id}/notes", account_id: account_id) pager(path, **) end |
#list_account_subscriptions(account_id:, **options) ⇒ Pager<Resources::Subscription>
List an account's subscriptions
list_account_subscriptions api documentation
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.
:state [String] Filter by state.
- When +state=active+, +state=canceled+, +state=expired+, or +state=future+, subscriptions with states that match the query and only those subscriptions will be returned.
- When +state=in_trial+, only subscriptions that have a trial_started_at date earlier than now and a trial_ends_at date later than now will be returned.
- When +state=live+, only subscriptions that are in an active, canceled, or future state or are in trial will be returned.
1332 1333 1334 1335 |
# File 'lib/recurly/client/operations.rb', line 1332 def list_account_subscriptions(account_id:, **) path = interpolate_path("/accounts/{account_id}/subscriptions", account_id: account_id) pager(path, **) end |
#list_account_transactions(account_id:, **options) ⇒ Pager<Resources::Transaction>
List an account's transactions
list_account_transactions api documentation
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 field. The value +payment+ will return both +purchase+ and +capture+ transactions.
:success [String] Filter by success field.
1383 1384 1385 1386 |
# File 'lib/recurly/client/operations.rb', line 1383 def list_account_transactions(account_id:, **) path = interpolate_path("/accounts/{account_id}/transactions", account_id: account_id) pager(path, **) end |
#list_accounts(**options) ⇒ Pager<Resources::Account>
List a site's accounts
list_accounts api documentation
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.
:email [String] Filter for accounts with this exact email address. A blank value will return accounts with both +null+ and +""+ email addresses. Note that multiple accounts can share one email address.
:subscriber [Boolean] Filter for accounts with or without a subscription in the +active+,
+canceled+, or +future+ state.
:past_due [String] Filter for accounts with an invoice in the +past_due+ state.
119 120 121 122 |
# File 'lib/recurly/client/operations.rb', line 119 def list_accounts(**) path = "/accounts" pager(path, **) end |
#list_active_coupon_redemptions(account_id:, **options) ⇒ Pager<Resources::CouponRedemption>
List the coupon redemptions that are active on an account
657 658 659 660 |
# File 'lib/recurly/client/operations.rb', line 657 def list_active_coupon_redemptions(account_id:, **) path = interpolate_path("/accounts/{account_id}/coupon_redemptions/active", account_id: account_id) pager(path, **) end |
#list_add_ons(**options) ⇒ Pager<Resources::AddOn>
List a site's add-ons
list_add_ons api documentation
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.
:state [String] Filter by state.
3390 3391 3392 3393 |
# File 'lib/recurly/client/operations.rb', line 3390 def list_add_ons(**) path = "/add_ons" pager(path, **) end |
#list_billing_infos(account_id:, **options) ⇒ Pager<Resources::BillingInfo>
Get the list of billing information associated with an account
list_billing_infos api documentation
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.
: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.
526 527 528 529 |
# File 'lib/recurly/client/operations.rb', line 526 def list_billing_infos(account_id:, **) path = interpolate_path("/accounts/{account_id}/billing_infos", account_id: account_id) pager(path, **) end |
#list_business_entities(**options) ⇒ Pager<Resources::BusinessEntity>
List business entities
4722 4723 4724 4725 |
# File 'lib/recurly/client/operations.rb', line 4722 def list_business_entities(**) path = "/business_entities" pager(path, **) end |
#list_business_entity_invoices(business_entity_id:, **options) ⇒ Pager<Resources::Invoice>
List a business entity's invoices
list_business_entity_invoices api documentation
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.
:state [String] Invoice state.
: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.
4837 4838 4839 4840 |
# File 'lib/recurly/client/operations.rb', line 4837 def list_business_entity_invoices(business_entity_id:, **) path = interpolate_path("/business_entities/{business_entity_id}/invoices", business_entity_id: business_entity_id) pager(path, **) end |
#list_child_accounts(account_id:, **options) ⇒ Pager<Resources::Account>
List an account's child accounts
list_child_accounts api documentation
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.
:email [String] Filter for accounts with this exact email address. A blank value will return accounts with both +null+ and +""+ email addresses. Note that multiple accounts can share one email address.
:subscriber [Boolean] Filter for accounts with or without a subscription in the +active+,
+canceled+, or +future+ state.
:past_due [String] Filter for accounts with an invoice in the +past_due+ state.
1437 1438 1439 1440 |
# File 'lib/recurly/client/operations.rb', line 1437 def list_child_accounts(account_id:, **) path = interpolate_path("/accounts/{account_id}/accounts", account_id: account_id) pager(path, **) end |
#list_coupons(**options) ⇒ Pager<Resources::Coupon>
List a site's coupons
list_coupons api documentation
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.
1527 1528 1529 1530 |
# File 'lib/recurly/client/operations.rb', line 1527 def list_coupons(**) path = "/coupons" pager(path, **) end |
#list_credit_payments(**options) ⇒ Pager<Resources::CreditPayment>
List a site's credit payments
list_credit_payments api documentation
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.
1738 1739 1740 1741 |
# File 'lib/recurly/client/operations.rb', line 1738 def list_credit_payments(**) path = "/credit_payments" pager(path, **) end |
#list_custom_field_definitions(**options) ⇒ Pager<Resources::CustomFieldDefinition>
List a site's custom field definitions
list_custom_field_definitions api documentation
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.
:related_type [String] Filter by related type.
1798 1799 1800 1801 |
# File 'lib/recurly/client/operations.rb', line 1798 def list_custom_field_definitions(**) path = "/custom_field_definitions" pager(path, **) end |
#list_dunning_campaigns(**options) ⇒ Pager<Resources::DunningCampaign>
List the dunning campaigns for a site
list_dunning_campaigns api documentation
order. In descending order updated records will move behind the cursor and could
prevent some records from being returned.
4530 4531 4532 4533 |
# File 'lib/recurly/client/operations.rb', line 4530 def list_dunning_campaigns(**) path = "/dunning_campaigns" pager(path, **) end |
#list_entitlements(account_id:, **options) ⇒ Pager<Resources::Entitlements>
List entitlements granted to an account
list_entitlements api documentation
- When +state=active+, +state=canceled+, +state=expired+, or +state=future+, subscriptions with states that match the query and only those subscriptions will be returned.
- When no state is provided, subscriptions with active or canceled states will be returned.
4677 4678 4679 4680 |
# File 'lib/recurly/client/operations.rb', line 4677 def list_entitlements(account_id:, **) path = interpolate_path("/accounts/{account_id}/entitlements", account_id: account_id) pager(path, **) end |
#list_external_invoices(**options) ⇒ Pager<Resources::ExternalInvoice>
List the external invoices on a site
list_external_invoices api documentation
order. In descending order updated records will move behind the cursor and could
prevent some records from being returned.
:limit [Integer] Limit number of records 1-200.
:order [String] Sort order.
4609 4610 4611 4612 |
# File 'lib/recurly/client/operations.rb', line 4609 def list_external_invoices(**) path = "/external_invoices" pager(path, **) end |
#list_external_product_external_product_references(external_product_id:, **options) ⇒ Pager<Resources::ExternalProductReferenceCollection>
List the external product references for an external product
list_external_product_external_product_references api documentation
order. In descending order updated records will move behind the cursor and could
prevent some records from being returned.
2336 2337 2338 2339 |
# File 'lib/recurly/client/operations.rb', line 2336 def list_external_product_external_product_references(external_product_id:, **) path = interpolate_path("/external_products/{external_product_id}/external_product_references", external_product_id: external_product_id) pager(path, **) end |
#list_external_products(**options) ⇒ Pager<Resources::ExternalProduct>
List a site's external products
list_external_products api documentation
order. In descending order updated records will move behind the cursor and could
prevent some records from being returned.
2261 2262 2263 2264 |
# File 'lib/recurly/client/operations.rb', line 2261 def list_external_products(**) path = "/external_products" pager(path, **) end |
#list_external_subscription_external_invoices(external_subscription_id:, **options) ⇒ Pager<Resources::ExternalInvoice>
List the external invoices on an external subscription
list_external_subscription_external_invoices api documentation
order. In descending order updated records will move behind the cursor and could
prevent some records from being returned.
:limit [Integer] Limit number of records 1-200.
:order [String] Sort order.
2461 2462 2463 2464 |
# File 'lib/recurly/client/operations.rb', line 2461 def list_external_subscription_external_invoices(external_subscription_id:, **) path = interpolate_path("/external_subscriptions/{external_subscription_id}/external_invoices", external_subscription_id: external_subscription_id) pager(path, **) end |
#list_external_subscription_external_payment_phases(external_subscription_id:, **options) ⇒ Pager<Resources::ExternalPaymentPhase>
List the external payment phases on an external subscription
list_external_subscription_external_payment_phases api documentation
order. In descending order updated records will move behind the cursor and could
prevent some records from being returned.
:limit [Integer] Limit number of records 1-200.
:order [String] Sort order.
4643 4644 4645 4646 |
# File 'lib/recurly/client/operations.rb', line 4643 def list_external_subscription_external_payment_phases(external_subscription_id:, **) path = interpolate_path("/external_subscriptions/{external_subscription_id}/external_payment_phases", external_subscription_id: external_subscription_id) pager(path, **) end |
#list_external_subscriptions(**options) ⇒ Pager<Resources::ExternalSubscription>
List the external subscriptions on a site
list_external_subscriptions api documentation
order. In descending order updated records will move behind the cursor and could
prevent some records from being returned.
2412 2413 2414 2415 |
# File 'lib/recurly/client/operations.rb', line 2412 def list_external_subscriptions(**) path = "/external_subscriptions" pager(path, **) end |
#list_general_ledger_accounts(**options) ⇒ Pager<Resources::GeneralLedgerAccount>
List a site's general ledger accounts
list_general_ledger_accounts api documentation
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.
:account_type [String] General Ledger Account type by which to filter the response.
1869 1870 1871 1872 |
# File 'lib/recurly/client/operations.rb', line 1869 def list_general_ledger_accounts(**) path = "/general_ledger_accounts" pager(path, **) end |
#list_gift_cards(**options) ⇒ Pager<Resources::GiftCard>
List gift cards
4735 4736 4737 4738 |
# File 'lib/recurly/client/operations.rb', line 4735 def list_gift_cards(**) path = "/gift_cards" pager(path, **) end |
#list_invoice_coupon_redemptions(invoice_id:, **options) ⇒ Pager<Resources::CouponRedemption>
List the coupon redemptions applied to an invoice
list_invoice_coupon_redemptions api documentation
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.
: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.
2859 2860 2861 2862 |
# File 'lib/recurly/client/operations.rb', line 2859 def list_invoice_coupon_redemptions(invoice_id:, **) path = interpolate_path("/invoices/{invoice_id}/coupon_redemptions", invoice_id: invoice_id) pager(path, **) end |
#list_invoice_line_items(invoice_id:, **options) ⇒ Pager<Resources::LineItem>
List an invoice's line items
list_invoice_line_items api documentation
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.
:original [String] Filter by original field.
:state [String] Filter by state field.
:type [String] Filter by type field.
2812 2813 2814 2815 |
# File 'lib/recurly/client/operations.rb', line 2812 def list_invoice_line_items(invoice_id:, **) path = interpolate_path("/invoices/{invoice_id}/line_items", invoice_id: invoice_id) pager(path, **) end |
#list_invoice_template_accounts(invoice_template_id:, **options) ⇒ Pager<Resources::Account>
List an invoice template's associated accounts
list_invoice_template_accounts api documentation
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.
:email [String] Filter for accounts with this exact email address. A blank value will return accounts with both +null+ and +""+ email addresses. Note that multiple accounts can share one email address.
:subscriber [Boolean] Filter for accounts with or without a subscription in the +active+,
+canceled+, or +future+ state.
:past_due [String] Filter for accounts with an invoice in the +past_due+ state.
1968 1969 1970 1971 |
# File 'lib/recurly/client/operations.rb', line 1968 def list_invoice_template_accounts(invoice_template_id:, **) path = interpolate_path("/invoice_templates/{invoice_template_id}/accounts", invoice_template_id: invoice_template_id) pager(path, **) end |
#list_invoice_templates(**options) ⇒ Pager<Resources::InvoiceTemplate>
Show the invoice templates for a site
list_invoice_templates api documentation
order. In descending order updated records will move behind the cursor and could
prevent some records from being returned.
4576 4577 4578 4579 |
# File 'lib/recurly/client/operations.rb', line 4576 def list_invoice_templates(**) path = "/invoice_templates" pager(path, **) end |
#list_invoices(**options) ⇒ Pager<Resources::Invoice>
List a site's invoices
list_invoices api documentation
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.
:state [String] Invoice state.
: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.
2528 2529 2530 2531 |
# File 'lib/recurly/client/operations.rb', line 2528 def list_invoices(**) path = "/invoices" pager(path, **) end |
#list_items(**options) ⇒ Pager<Resources::Item>
List a site's items
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.
:state [String] Filter by state.
2014 2015 2016 2017 |
# File 'lib/recurly/client/operations.rb', line 2014 def list_items(**) path = "/items" pager(path, **) end |
#list_line_items(**options) ⇒ Pager<Resources::LineItem>
List a site's line items
list_line_items api documentation
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.
:original [String] Filter by original field.
:state [String] Filter by state field.
:type [String] Filter by type field.
2965 2966 2967 2968 |
# File 'lib/recurly/client/operations.rb', line 2965 def list_line_items(**) path = "/line_items" pager(path, **) end |
#list_measured_unit(**options) ⇒ Pager<Resources::MeasuredUnit>
List a site's measured units
list_measured_unit api documentation
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.
:state [String] Filter by state.
2187 2188 2189 2190 |
# File 'lib/recurly/client/operations.rb', line 2187 def list_measured_unit(**) path = "/measured_units" pager(path, **) end |
#list_plan_add_ons(plan_id:, **options) ⇒ Pager<Resources::AddOn>
List a plan's add-ons
list_plan_add_ons api documentation
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.
:state [String] Filter by state.
3222 3223 3224 3225 |
# File 'lib/recurly/client/operations.rb', line 3222 def list_plan_add_ons(plan_id:, **) path = interpolate_path("/plans/{plan_id}/add_ons", plan_id: plan_id) pager(path, **) end |
#list_plans(**options) ⇒ Pager<Resources::Plan>
List a site's plans
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.
:state [String] Filter by state.
3059 3060 3061 3062 |
# File 'lib/recurly/client/operations.rb', line 3059 def list_plans(**) path = "/plans" pager(path, **) end |
#list_related_invoices(invoice_id:, **options) ⇒ Pager<Resources::Invoice>
List an invoice's related credit or charge invoices
2884 2885 2886 2887 |
# File 'lib/recurly/client/operations.rb', line 2884 def (invoice_id:, **) path = interpolate_path("/invoices/{invoice_id}/related_invoices", invoice_id: invoice_id) pager(path, **) end |
#list_shipping_addresses(account_id:, **options) ⇒ Pager<Resources::ShippingAddress>
Fetch a list of an account's shipping addresses
list_shipping_addresses api documentation
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.
1155 1156 1157 1158 |
# File 'lib/recurly/client/operations.rb', line 1155 def list_shipping_addresses(account_id:, **) path = interpolate_path("/accounts/{account_id}/shipping_addresses", account_id: account_id) pager(path, **) end |
#list_shipping_methods(**options) ⇒ Pager<Resources::ShippingMethod>
List a site's shipping methods
list_shipping_methods api documentation
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.
3460 3461 3462 3463 |
# File 'lib/recurly/client/operations.rb', line 3460 def list_shipping_methods(**) path = "/shipping_methods" pager(path, **) end |
#list_sites(**options) ⇒ Pager<Resources::Site>
List sites
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.
:state [String] Filter by state.
46 47 48 49 |
# File 'lib/recurly/client/operations.rb', line 46 def list_sites(**) path = "/sites" pager(path, **) end |
#list_subscription_coupon_redemptions(subscription_id:, **options) ⇒ Pager<Resources::CouponRedemption>
List the coupon redemptions for a subscription
list_subscription_coupon_redemptions api documentation
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.
: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.
4089 4090 4091 4092 |
# File 'lib/recurly/client/operations.rb', line 4089 def list_subscription_coupon_redemptions(subscription_id:, **) path = interpolate_path("/subscriptions/{subscription_id}/coupon_redemptions", subscription_id: subscription_id) pager(path, **) end |
#list_subscription_invoices(subscription_id:, **options) ⇒ Pager<Resources::Invoice>
List a subscription's invoices
list_subscription_invoices api documentation
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.
:state [String] Invoice state.
: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.
3990 3991 3992 3993 |
# File 'lib/recurly/client/operations.rb', line 3990 def list_subscription_invoices(subscription_id:, **) path = interpolate_path("/subscriptions/{subscription_id}/invoices", subscription_id: subscription_id) pager(path, **) end |
#list_subscription_line_items(subscription_id:, **options) ⇒ Pager<Resources::LineItem>
List a subscription's line items
list_subscription_line_items api documentation
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.
:original [String] Filter by original field.
:state [String] Filter by state field.
:type [String] Filter by type field.
4042 4043 4044 4045 |
# File 'lib/recurly/client/operations.rb', line 4042 def list_subscription_line_items(subscription_id:, **) path = interpolate_path("/subscriptions/{subscription_id}/line_items", subscription_id: subscription_id) pager(path, **) end |
#list_subscriptions(**options) ⇒ Pager<Resources::Subscription>
List a site's subscriptions
list_subscriptions api documentation
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.
:state [String] Filter by state.
- When +state=active+, +state=canceled+, +state=expired+, or +state=future+, subscriptions with states that match the query and only those subscriptions will be returned.
- When +state=in_trial+, only subscriptions that have a trial_started_at date earlier than now and a trial_ends_at date later than now will be returned.
- When +state=live+, only subscriptions that are in an active, canceled, or future state or are in trial will be returned.
3568 3569 3570 3571 |
# File 'lib/recurly/client/operations.rb', line 3568 def list_subscriptions(**) path = "/subscriptions" pager(path, **) end |
#list_transactions(**options) ⇒ Pager<Resources::Transaction>
List a site's transactions
list_transactions api documentation
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 field. The value +payment+ will return both +purchase+ and +capture+ transactions.
:success [String] Filter by success field.
4235 4236 4237 4238 |
# File 'lib/recurly/client/operations.rb', line 4235 def list_transactions(**) path = "/transactions" pager(path, **) end |
#list_unique_coupon_codes(coupon_id:, **options) ⇒ Pager<Resources::UniqueCouponCode>
List unique coupon codes associated with a bulk coupon
list_unique_coupon_codes api documentation
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.
:redeemed [String] Filter unique coupon codes by redemption status. +true+ for redeemed, +false+ for not redeemed.
1705 1706 1707 1708 |
# File 'lib/recurly/client/operations.rb', line 1705 def list_unique_coupon_codes(coupon_id:, **) path = interpolate_path("/coupons/{coupon_id}/unique_coupon_codes", coupon_id: coupon_id) pager(path, **) end |
#list_usage(subscription_id:, add_on_id:, **options) ⇒ Pager<Resources::Usage>
List a subscription add-on's usage records
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 +usage_timestamp+ 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=usage_timestamp+ or +sort=recorded_timestamp+.
*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=usage_timestamp+ or +sort=recorded_timestamp+.
*Note:* this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
:billing_status [String] Filter by usage record's billing status
4129 4130 4131 4132 |
# File 'lib/recurly/client/operations.rb', line 4129 def list_usage(subscription_id:, add_on_id:, **) path = interpolate_path("/subscriptions/{subscription_id}/add_ons/{add_on_id}/usage", subscription_id: subscription_id, add_on_id: add_on_id) pager(path, **) end |
#mark_invoice_failed(invoice_id:, **options) ⇒ Resources::Invoice
Mark an open invoice as failed
2676 2677 2678 2679 |
# File 'lib/recurly/client/operations.rb', line 2676 def mark_invoice_failed(invoice_id:, **) path = interpolate_path("/invoices/{invoice_id}/mark_failed", invoice_id: invoice_id) put(path, **) end |
#mark_invoice_successful(invoice_id:, **options) ⇒ Resources::Invoice
Mark an open invoice as successful
2699 2700 2701 2702 |
# File 'lib/recurly/client/operations.rb', line 2699 def mark_invoice_successful(invoice_id:, **) path = interpolate_path("/invoices/{invoice_id}/mark_successful", invoice_id: invoice_id) put(path, **) end |
#pause_subscription(subscription_id:, body:, **options) ⇒ Resources::Subscription
Pause subscription
3774 3775 3776 3777 |
# File 'lib/recurly/client/operations.rb', line 3774 def pause_subscription(subscription_id:, body:, **) path = interpolate_path("/subscriptions/{subscription_id}/pause", subscription_id: subscription_id) put(path, body, Requests::SubscriptionPause, **) end |
#preview_gift_card(body:, **options) ⇒ Resources::GiftCard
Preview gift card
4777 4778 4779 4780 |
# File 'lib/recurly/client/operations.rb', line 4777 def preview_gift_card(body:, **) path = "/gift_cards/preview" post(path, body, Requests::GiftCardCreate, **) end |
#preview_invoice(account_id:, body:, **options) ⇒ Resources::InvoiceCollection
Preview new invoice for pending line items
961 962 963 964 |
# File 'lib/recurly/client/operations.rb', line 961 def preview_invoice(account_id:, body:, **) path = interpolate_path("/accounts/{account_id}/invoices/preview", account_id: account_id) post(path, body, Requests::InvoiceCreate, **) end |
#preview_purchase(body:, **options) ⇒ Resources::InvoiceCollection
Preview a new purchase
4380 4381 4382 4383 |
# File 'lib/recurly/client/operations.rb', line 4380 def preview_purchase(body:, **) path = "/purchases/preview" post(path, body, Requests::PurchaseCreate, **) end |
#preview_subscription_change(subscription_id:, body:, **options) ⇒ Resources::SubscriptionChange
Preview a new subscription change
3934 3935 3936 3937 |
# File 'lib/recurly/client/operations.rb', line 3934 def preview_subscription_change(subscription_id:, body:, **) path = interpolate_path("/subscriptions/{subscription_id}/change/preview", subscription_id: subscription_id) post(path, body, Requests::SubscriptionChangeCreate, **) end |
#put_dunning_campaign_bulk_update(dunning_campaign_id:, body:, **options) ⇒ Resources::DunningCampaignsBulkUpdateResponse
Assign a dunning campaign to multiple plans
4559 4560 4561 4562 |
# File 'lib/recurly/client/operations.rb', line 4559 def put_dunning_campaign_bulk_update(dunning_campaign_id:, body:, **) path = interpolate_path("/dunning_campaigns/{dunning_campaign_id}/bulk_update", dunning_campaign_id: dunning_campaign_id) put(path, body, Requests::DunningCampaignsBulkUpdate, **) end |
#put_external_subscription(external_subscription_id:, **options) ⇒ Resources::ExternalSubscription
Update an external subscription
2441 2442 2443 2444 |
# File 'lib/recurly/client/operations.rb', line 2441 def put_external_subscription(external_subscription_id:, **) path = interpolate_path("/external_subscriptions/{external_subscription_id}", external_subscription_id: external_subscription_id) put(path, [:body], Requests::ExternalSubscriptionUpdate, **) end |
#reactivate_account(account_id:, **options) ⇒ Resources::Account
Reactivate an inactive account
351 352 353 354 |
# File 'lib/recurly/client/operations.rb', line 351 def reactivate_account(account_id:, **) path = interpolate_path("/accounts/{account_id}/reactivate", account_id: account_id) put(path, **) end |
#reactivate_item(item_id:, **options) ⇒ Resources::Item
Reactivate an inactive item
2149 2150 2151 2152 |
# File 'lib/recurly/client/operations.rb', line 2149 def reactivate_item(item_id:, **) path = interpolate_path("/items/{item_id}/reactivate", item_id: item_id) put(path, **) end |
#reactivate_subscription(subscription_id:, **options) ⇒ Resources::Subscription
Reactivate a canceled subscription
3744 3745 3746 3747 |
# File 'lib/recurly/client/operations.rb', line 3744 def reactivate_subscription(subscription_id:, **) path = interpolate_path("/subscriptions/{subscription_id}/reactivate", subscription_id: subscription_id) put(path, **) end |
#reactivate_unique_coupon_code(unique_coupon_code_id:, **options) ⇒ Resources::UniqueCouponCode
Restore a unique coupon code
4300 4301 4302 4303 |
# File 'lib/recurly/client/operations.rb', line 4300 def reactivate_unique_coupon_code(unique_coupon_code_id:, **) path = interpolate_path("/unique_coupon_codes/{unique_coupon_code_id}/restore", unique_coupon_code_id: unique_coupon_code_id) put(path, **) end |
#record_external_transaction(invoice_id:, body:, **options) ⇒ Resources::Transaction
Record an external payment for a manual invoices.
2760 2761 2762 2763 |
# File 'lib/recurly/client/operations.rb', line 2760 def record_external_transaction(invoice_id:, body:, **) path = interpolate_path("/invoices/{invoice_id}/transactions", invoice_id: invoice_id) post(path, body, Requests::ExternalTransaction, **) end |
#redeem_gift_card(redemption_code:, body:, **options) ⇒ Resources::GiftCard
Redeem gift card
4792 4793 4794 4795 |
# File 'lib/recurly/client/operations.rb', line 4792 def redeem_gift_card(redemption_code:, body:, **) path = interpolate_path("/gift_cards/{redemption_code}/redeem", redemption_code: redemption_code) post(path, body, Requests::GiftCardRedeem, **) end |
#refund_invoice(invoice_id:, body:, **options) ⇒ Resources::Invoice
Refund an invoice
2915 2916 2917 2918 |
# File 'lib/recurly/client/operations.rb', line 2915 def refund_invoice(invoice_id:, body:, **) path = interpolate_path("/invoices/{invoice_id}/refund", invoice_id: invoice_id) post(path, body, Requests::InvoiceRefund, **) end |
#remove_a_billing_info(account_id:, billing_info_id:, **options) ⇒ Resources::Empty
Remove an account's billing information
587 588 589 590 |
# File 'lib/recurly/client/operations.rb', line 587 def remove_a_billing_info(account_id:, billing_info_id:, **) path = interpolate_path("/accounts/{account_id}/billing_infos/{billing_info_id}", account_id: account_id, billing_info_id: billing_info_id) delete(path, **) end |
#remove_account_acquisition(account_id:, **options) ⇒ Resources::Empty
Remove an account's acquisition data
328 329 330 331 |
# File 'lib/recurly/client/operations.rb', line 328 def remove_account_acquisition(account_id:, **) path = interpolate_path("/accounts/{account_id}/acquisition", account_id: account_id) delete(path, **) end |
#remove_billing_info(account_id:, **options) ⇒ Resources::Empty
Remove an account's billing information
451 452 453 454 |
# File 'lib/recurly/client/operations.rb', line 451 def remove_billing_info(account_id:, **) path = interpolate_path("/accounts/{account_id}/billing_info", account_id: account_id) delete(path, **) end |
#remove_coupon_redemption(account_id:, **options) ⇒ Resources::CouponRedemption
Delete the active coupon redemption from an account
711 712 713 714 |
# File 'lib/recurly/client/operations.rb', line 711 def remove_coupon_redemption(account_id:, **) path = interpolate_path("/accounts/{account_id}/coupon_redemptions/active", account_id: account_id) delete(path, **) end |
#remove_line_item(line_item_id:, **options) ⇒ Resources::Empty
Delete an uninvoiced line item
3013 3014 3015 3016 |
# File 'lib/recurly/client/operations.rb', line 3013 def remove_line_item(line_item_id:, **) path = interpolate_path("/line_items/{line_item_id}", line_item_id: line_item_id) delete(path, **) end |
#remove_measured_unit(measured_unit_id:, **options) ⇒ Resources::MeasuredUnit
Remove a measured unit
2244 2245 2246 2247 |
# File 'lib/recurly/client/operations.rb', line 2244 def remove_measured_unit(measured_unit_id:, **) path = interpolate_path("/measured_units/{measured_unit_id}", measured_unit_id: measured_unit_id) delete(path, **) end |
#remove_plan(plan_id:, **options) ⇒ Resources::Plan
Remove a plan
3172 3173 3174 3175 |
# File 'lib/recurly/client/operations.rb', line 3172 def remove_plan(plan_id:, **) path = interpolate_path("/plans/{plan_id}", plan_id: plan_id) delete(path, **) end |
#remove_plan_add_on(plan_id:, add_on_id:, **options) ⇒ Resources::AddOn
Remove an add-on
3342 3343 3344 3345 |
# File 'lib/recurly/client/operations.rb', line 3342 def remove_plan_add_on(plan_id:, add_on_id:, **) path = interpolate_path("/plans/{plan_id}/add_ons/{add_on_id}", plan_id: plan_id, add_on_id: add_on_id) delete(path, **) end |
#remove_shipping_address(account_id:, shipping_address_id:, **options) ⇒ Resources::Empty
Remove an account's shipping address
1277 1278 1279 1280 |
# File 'lib/recurly/client/operations.rb', line 1277 def remove_shipping_address(account_id:, shipping_address_id:, **) path = interpolate_path("/accounts/{account_id}/shipping_addresses/{shipping_address_id}", account_id: account_id, shipping_address_id: shipping_address_id) delete(path, **) end |
#remove_subscription_change(subscription_id:, **options) ⇒ Resources::Empty
Delete the pending subscription change
3919 3920 3921 3922 |
# File 'lib/recurly/client/operations.rb', line 3919 def remove_subscription_change(subscription_id:, **) path = interpolate_path("/subscriptions/{subscription_id}/change", subscription_id: subscription_id) delete(path, **) end |
#remove_usage(usage_id:, **options) ⇒ Resources::Empty
Delete a usage record.
4188 4189 4190 4191 |
# File 'lib/recurly/client/operations.rb', line 4188 def remove_usage(usage_id:, **) path = interpolate_path("/usage/{usage_id}", usage_id: usage_id) delete(path, **) end |
#reopen_invoice(invoice_id:, **options) ⇒ Resources::Invoice
Reopen a closed, manual invoice
2722 2723 2724 2725 |
# File 'lib/recurly/client/operations.rb', line 2722 def reopen_invoice(invoice_id:, **) path = interpolate_path("/invoices/{invoice_id}/reopen", invoice_id: invoice_id) put(path, **) end |
#restore_coupon(coupon_id:, body:, **options) ⇒ Resources::Coupon
Restore an inactive coupon
1666 1667 1668 1669 |
# File 'lib/recurly/client/operations.rb', line 1666 def restore_coupon(coupon_id:, body:, **) path = interpolate_path("/coupons/{coupon_id}/restore", coupon_id: coupon_id) put(path, body, Requests::CouponUpdate, **) end |
#resume_subscription(subscription_id:, **options) ⇒ Resources::Subscription
Resume subscription
3799 3800 3801 3802 |
# File 'lib/recurly/client/operations.rb', line 3799 def resume_subscription(subscription_id:, **) path = interpolate_path("/subscriptions/{subscription_id}/resume", subscription_id: subscription_id) put(path, **) end |
#show_external_invoice(external_invoice_id:, **options) ⇒ Resources::ExternalInvoice
Fetch an external invoice
4623 4624 4625 4626 |
# File 'lib/recurly/client/operations.rb', line 4623 def show_external_invoice(external_invoice_id:, **) path = interpolate_path("/external_invoices/{external_invoice_id}", external_invoice_id: external_invoice_id) get(path, **) end |
#terminate_subscription(subscription_id:, **options) ⇒ Resources::Subscription
Terminate a subscription
terminate_subscription api documentation
* +full+ - Performs a full refund of the last invoice for the current subscription term.
* +partial+ - Prorates a refund based on the amount of time remaining in the current bill cycle.
* +none+ - Terminates the subscription without a refund.
In the event that the most recent invoice is a $0 invoice paid entirely by credit, Recurly will apply the credit back to the customer’s account.
You may also terminate a subscription with no refund and then manually refund specific invoices.
:charge [Boolean] Applicable only if the subscription has usage based add-ons and unbilled usage logged for the current billing cycle. If true, current billing cycle unbilled usage is billed on the final invoice. If false, Recurly will create a negative usage record for current billing cycle usage that will zero out the final invoice line items.
3693 3694 3695 3696 |
# File 'lib/recurly/client/operations.rb', line 3693 def terminate_subscription(subscription_id:, **) path = interpolate_path("/subscriptions/{subscription_id}", subscription_id: subscription_id) delete(path, **) end |
#update_a_billing_info(account_id:, billing_info_id:, body:, **options) ⇒ Resources::BillingInfo
Update an account's billing information
572 573 574 575 |
# File 'lib/recurly/client/operations.rb', line 572 def update_a_billing_info(account_id:, billing_info_id:, body:, **) path = interpolate_path("/accounts/{account_id}/billing_infos/{billing_info_id}", account_id: account_id, billing_info_id: billing_info_id) put(path, body, Requests::BillingInfoCreate, **) end |
#update_account(account_id:, body:, **options) ⇒ Resources::Account
Update an account
223 224 225 226 |
# File 'lib/recurly/client/operations.rb', line 223 def update_account(account_id:, body:, **) path = interpolate_path("/accounts/{account_id}", account_id: account_id) put(path, body, Requests::AccountUpdate, **) end |
#update_account_acquisition(account_id:, body:, **options) ⇒ Resources::AccountAcquisition
Update an account's acquisition data
305 306 307 308 |
# File 'lib/recurly/client/operations.rb', line 305 def update_account_acquisition(account_id:, body:, **) path = interpolate_path("/accounts/{account_id}/acquisition", account_id: account_id) put(path, body, Requests::AccountAcquisitionUpdate, **) end |
#update_account_external_account(account_id:, external_account_id:, body:, **options) ⇒ Resources::ExternalAccount
Update an external account
808 809 810 811 |
# File 'lib/recurly/client/operations.rb', line 808 def update_account_external_account(account_id:, external_account_id:, body:, **) 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, **) end |
#update_billing_info(account_id:, body:, **options) ⇒ Resources::BillingInfo
Set an account's billing information
428 429 430 431 |
# File 'lib/recurly/client/operations.rb', line 428 def update_billing_info(account_id:, body:, **) path = interpolate_path("/accounts/{account_id}/billing_info", account_id: account_id) put(path, body, Requests::BillingInfoCreate, **) end |
#update_coupon(coupon_id:, body:, **options) ⇒ Resources::Coupon
Update an active coupon
1613 1614 1615 1616 |
# File 'lib/recurly/client/operations.rb', line 1613 def update_coupon(coupon_id:, body:, **) path = interpolate_path("/coupons/{coupon_id}", coupon_id: coupon_id) put(path, body, Requests::CouponUpdate, **) end |
#update_external_product(external_product_id:, body:, **options) ⇒ Resources::ExternalProduct
Update an external product
2304 2305 2306 2307 |
# File 'lib/recurly/client/operations.rb', line 2304 def update_external_product(external_product_id:, body:, **) path = interpolate_path("/external_products/{external_product_id}", external_product_id: external_product_id) put(path, body, Requests::ExternalProductUpdate, **) end |
#update_general_ledger_account(general_ledger_account_id:, body:, **options) ⇒ Resources::GeneralLedgerAccount
Update a general ledger account
1898 1899 1900 1901 |
# File 'lib/recurly/client/operations.rb', line 1898 def update_general_ledger_account(general_ledger_account_id:, body:, **) path = interpolate_path("/general_ledger_accounts/{general_ledger_account_id}", general_ledger_account_id: general_ledger_account_id) put(path, body, Requests::GeneralLedgerAccountUpdate, **) end |
#update_invoice(invoice_id:, body:, **options) ⇒ Resources::Invoice
Update an invoice
2579 2580 2581 2582 |
# File 'lib/recurly/client/operations.rb', line 2579 def update_invoice(invoice_id:, body:, **) path = interpolate_path("/invoices/{invoice_id}", invoice_id: invoice_id) put(path, body, Requests::InvoiceUpdate, **) end |
#update_item(item_id:, body:, **options) ⇒ Resources::Item
Update an active item
2103 2104 2105 2106 |
# File 'lib/recurly/client/operations.rb', line 2103 def update_item(item_id:, body:, **) path = interpolate_path("/items/{item_id}", item_id: item_id) put(path, body, Requests::ItemUpdate, **) end |
#update_measured_unit(measured_unit_id:, body:, **options) ⇒ Resources::MeasuredUnit
Update a measured unit
2230 2231 2232 2233 |
# File 'lib/recurly/client/operations.rb', line 2230 def update_measured_unit(measured_unit_id:, body:, **) path = interpolate_path("/measured_units/{measured_unit_id}", measured_unit_id: measured_unit_id) put(path, body, Requests::MeasuredUnitUpdate, **) end |
#update_plan(plan_id:, body:, **options) ⇒ Resources::Plan
Update a plan
3149 3150 3151 3152 |
# File 'lib/recurly/client/operations.rb', line 3149 def update_plan(plan_id:, body:, **) path = interpolate_path("/plans/{plan_id}", plan_id: plan_id) put(path, body, Requests::PlanUpdate, **) end |
#update_plan_add_on(plan_id:, add_on_id:, body:, **options) ⇒ Resources::AddOn
Update an add-on
3315 3316 3317 3318 |
# File 'lib/recurly/client/operations.rb', line 3315 def update_plan_add_on(plan_id:, add_on_id:, body:, **) path = interpolate_path("/plans/{plan_id}/add_ons/{add_on_id}", plan_id: plan_id, add_on_id: add_on_id) put(path, body, Requests::AddOnUpdate, **) end |
#update_shipping_address(account_id:, shipping_address_id:, body:, **options) ⇒ Resources::ShippingAddress
Update an account's shipping address
1250 1251 1252 1253 |
# File 'lib/recurly/client/operations.rb', line 1250 def update_shipping_address(account_id:, shipping_address_id:, body:, **) path = interpolate_path("/accounts/{account_id}/shipping_addresses/{shipping_address_id}", account_id: account_id, shipping_address_id: shipping_address_id) put(path, body, Requests::ShippingAddressUpdate, **) end |
#update_shipping_method(shipping_method_id:, body:, **options) ⇒ Resources::ShippingMethod
Update an active Shipping Method
3503 3504 3505 3506 |
# File 'lib/recurly/client/operations.rb', line 3503 def update_shipping_method(shipping_method_id:, body:, **) path = interpolate_path("/shipping_methods/{shipping_method_id}", shipping_method_id: shipping_method_id) put(path, body, Requests::ShippingMethodUpdate, **) end |
#update_subscription(subscription_id:, body:, **options) ⇒ Resources::Subscription
Update a subscription
3657 3658 3659 3660 |
# File 'lib/recurly/client/operations.rb', line 3657 def update_subscription(subscription_id:, body:, **) path = interpolate_path("/subscriptions/{subscription_id}", subscription_id: subscription_id) put(path, body, Requests::SubscriptionUpdate, **) end |
#update_usage(usage_id:, body:, **options) ⇒ Resources::Usage
Update a usage record
4174 4175 4176 4177 |
# File 'lib/recurly/client/operations.rb', line 4174 def update_usage(usage_id:, body:, **) path = interpolate_path("/usage/{usage_id}", usage_id: usage_id) put(path, body, Requests::UsageCreate, **) end |
#verify_billing_info(account_id:, **options) ⇒ Resources::Transaction
Verify an account's credit card billing information
475 476 477 478 |
# File 'lib/recurly/client/operations.rb', line 475 def verify_billing_info(account_id:, **) path = interpolate_path("/accounts/{account_id}/billing_info/verify", account_id: account_id) post(path, [:body], Requests::BillingInfoVerify, **) end |
#verify_billing_info_cvv(account_id:, body:, **options) ⇒ Resources::Transaction
Verify an account's credit card billing cvv
490 491 492 493 |
# File 'lib/recurly/client/operations.rb', line 490 def verify_billing_info_cvv(account_id:, body:, **) path = interpolate_path("/accounts/{account_id}/billing_info/verify_cvv", account_id: account_id) post(path, body, Requests::BillingInfoVerifyCVV, **) end |
#void_invoice(invoice_id:, **options) ⇒ Resources::Invoice
Void a credit invoice.
2745 2746 2747 2748 |
# File 'lib/recurly/client/operations.rb', line 2745 def void_invoice(invoice_id:, **) path = interpolate_path("/invoices/{invoice_id}/void", invoice_id: invoice_id) put(path, **) end |