recurly 4.4.0 → 4.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.bumpversion.cfg +1 -1
- data/CHANGELOG.md +44 -0
- data/GETTING_STARTED.md +1 -1
- data/lib/recurly/client/operations.rb +59 -0
- data/lib/recurly/requests/account_create.rb +4 -0
- data/lib/recurly/requests/account_purchase.rb +4 -0
- data/lib/recurly/requests/account_update.rb +4 -0
- data/lib/recurly/requests/address.rb +1 -1
- data/lib/recurly/requests/billing_info_create.rb +2 -2
- data/lib/recurly/requests/dunning_campaigns_bulk_update.rb +18 -0
- data/lib/recurly/requests/invoice_address.rb +1 -1
- data/lib/recurly/requests/plan_create.rb +4 -0
- data/lib/recurly/requests/plan_update.rb +4 -0
- data/lib/recurly/requests/shipping_address_create.rb +1 -1
- data/lib/recurly/requests/shipping_address_update.rb +1 -1
- data/lib/recurly/requests/subscription_change_billing_info_create.rb +14 -0
- data/lib/recurly/requests/subscription_change_create.rb +4 -0
- data/lib/recurly/requests/subscription_create.rb +1 -1
- data/lib/recurly/requests/subscription_pause.rb +1 -1
- data/lib/recurly/requests/subscription_purchase.rb +1 -1
- data/lib/recurly/resources/account.rb +4 -0
- data/lib/recurly/resources/account_mini.rb +4 -0
- data/lib/recurly/resources/address.rb +1 -1
- data/lib/recurly/resources/address_with_name.rb +1 -1
- data/lib/recurly/resources/billing_info_updated_by.rb +1 -1
- data/lib/recurly/resources/dunning_campaign.rb +50 -0
- data/lib/recurly/resources/dunning_campaigns_bulk_update_response.rb +18 -0
- data/lib/recurly/resources/dunning_cycle.rb +58 -0
- data/lib/recurly/resources/dunning_interval.rb +18 -0
- data/lib/recurly/resources/invoice.rb +4 -0
- data/lib/recurly/resources/invoice_address.rb +1 -1
- data/lib/recurly/resources/payment_method.rb +4 -0
- data/lib/recurly/resources/plan.rb +4 -0
- data/lib/recurly/resources/shipping_address.rb +1 -1
- data/lib/recurly/resources/tax_info.rb +1 -1
- data/lib/recurly/resources/transaction.rb +1 -1
- data/lib/recurly/version.rb +1 -1
- data/openapi/api.yaml +409 -24
- metadata +9 -3
| @@ -0,0 +1,18 @@ | |
| 1 | 
            +
            # This file is automatically created by Recurly's OpenAPI generation process
         | 
| 2 | 
            +
            # and thus any edits you make by hand will be lost. If you wish to make a
         | 
| 3 | 
            +
            # change to this file, please create a Github issue explaining the changes you
         | 
| 4 | 
            +
            # need and we will usher them to the appropriate places.
         | 
| 5 | 
            +
            module Recurly
         | 
| 6 | 
            +
              module Resources
         | 
| 7 | 
            +
                class DunningCampaignsBulkUpdateResponse < Resource
         | 
| 8 | 
            +
             | 
| 9 | 
            +
                  # @!attribute object
         | 
| 10 | 
            +
                  #   @return [String] Object type
         | 
| 11 | 
            +
                  define_attribute :object, String
         | 
| 12 | 
            +
             | 
| 13 | 
            +
                  # @!attribute plans
         | 
| 14 | 
            +
                  #   @return [Array[Plan]] An array containing all of the `Plan` resources that have been updated.
         | 
| 15 | 
            +
                  define_attribute :plans, Array, { :item_type => :Plan }
         | 
| 16 | 
            +
                end
         | 
| 17 | 
            +
              end
         | 
| 18 | 
            +
            end
         | 
| @@ -0,0 +1,58 @@ | |
| 1 | 
            +
            # This file is automatically created by Recurly's OpenAPI generation process
         | 
| 2 | 
            +
            # and thus any edits you make by hand will be lost. If you wish to make a
         | 
| 3 | 
            +
            # change to this file, please create a Github issue explaining the changes you
         | 
| 4 | 
            +
            # need and we will usher them to the appropriate places.
         | 
| 5 | 
            +
            module Recurly
         | 
| 6 | 
            +
              module Resources
         | 
| 7 | 
            +
                class DunningCycle < Resource
         | 
| 8 | 
            +
             | 
| 9 | 
            +
                  # @!attribute applies_to_manual_trial
         | 
| 10 | 
            +
                  #   @return [Boolean] Whether the dunning settings will be applied to manual trials. Only applies to trial cycles.
         | 
| 11 | 
            +
                  define_attribute :applies_to_manual_trial, :Boolean
         | 
| 12 | 
            +
             | 
| 13 | 
            +
                  # @!attribute created_at
         | 
| 14 | 
            +
                  #   @return [DateTime] When the current settings were created in Recurly.
         | 
| 15 | 
            +
                  define_attribute :created_at, DateTime
         | 
| 16 | 
            +
             | 
| 17 | 
            +
                  # @!attribute expire_subscription
         | 
| 18 | 
            +
                  #   @return [Boolean] Whether the subscription(s) should be cancelled at the end of the dunning cycle.
         | 
| 19 | 
            +
                  define_attribute :expire_subscription, :Boolean
         | 
| 20 | 
            +
             | 
| 21 | 
            +
                  # @!attribute fail_invoice
         | 
| 22 | 
            +
                  #   @return [Boolean] Whether the invoice should be failed at the end of the dunning cycle.
         | 
| 23 | 
            +
                  define_attribute :fail_invoice, :Boolean
         | 
| 24 | 
            +
             | 
| 25 | 
            +
                  # @!attribute first_communication_interval
         | 
| 26 | 
            +
                  #   @return [Integer] The number of days after a transaction failure before the first dunning email is sent.
         | 
| 27 | 
            +
                  define_attribute :first_communication_interval, Integer
         | 
| 28 | 
            +
             | 
| 29 | 
            +
                  # @!attribute intervals
         | 
| 30 | 
            +
                  #   @return [Array[DunningInterval]] Dunning intervals.
         | 
| 31 | 
            +
                  define_attribute :intervals, Array, { :item_type => :DunningInterval }
         | 
| 32 | 
            +
             | 
| 33 | 
            +
                  # @!attribute send_immediately_on_hard_decline
         | 
| 34 | 
            +
                  #   @return [Boolean] Whether or not to send an extra email immediately to customers whose initial payment attempt fails with either a hard decline or invalid billing info.
         | 
| 35 | 
            +
                  define_attribute :send_immediately_on_hard_decline, :Boolean
         | 
| 36 | 
            +
             | 
| 37 | 
            +
                  # @!attribute total_dunning_days
         | 
| 38 | 
            +
                  #   @return [Integer] The number of days between the first dunning email being sent and the end of the dunning cycle.
         | 
| 39 | 
            +
                  define_attribute :total_dunning_days, Integer
         | 
| 40 | 
            +
             | 
| 41 | 
            +
                  # @!attribute total_recycling_days
         | 
| 42 | 
            +
                  #   @return [Integer] The number of days between a transaction failure and the end of the dunning cycle.
         | 
| 43 | 
            +
                  define_attribute :total_recycling_days, Integer
         | 
| 44 | 
            +
             | 
| 45 | 
            +
                  # @!attribute type
         | 
| 46 | 
            +
                  #   @return [String] The type of invoice this cycle applies to.
         | 
| 47 | 
            +
                  define_attribute :type, String
         | 
| 48 | 
            +
             | 
| 49 | 
            +
                  # @!attribute updated_at
         | 
| 50 | 
            +
                  #   @return [DateTime] When the current settings were updated in Recurly.
         | 
| 51 | 
            +
                  define_attribute :updated_at, DateTime
         | 
| 52 | 
            +
             | 
| 53 | 
            +
                  # @!attribute version
         | 
| 54 | 
            +
                  #   @return [Integer] Current campaign version.
         | 
| 55 | 
            +
                  define_attribute :version, Integer
         | 
| 56 | 
            +
                end
         | 
| 57 | 
            +
              end
         | 
| 58 | 
            +
            end
         | 
| @@ -0,0 +1,18 @@ | |
| 1 | 
            +
            # This file is automatically created by Recurly's OpenAPI generation process
         | 
| 2 | 
            +
            # and thus any edits you make by hand will be lost. If you wish to make a
         | 
| 3 | 
            +
            # change to this file, please create a Github issue explaining the changes you
         | 
| 4 | 
            +
            # need and we will usher them to the appropriate places.
         | 
| 5 | 
            +
            module Recurly
         | 
| 6 | 
            +
              module Resources
         | 
| 7 | 
            +
                class DunningInterval < Resource
         | 
| 8 | 
            +
             | 
| 9 | 
            +
                  # @!attribute days
         | 
| 10 | 
            +
                  #   @return [Integer] Number of days before sending the next email.
         | 
| 11 | 
            +
                  define_attribute :days, Integer
         | 
| 12 | 
            +
             | 
| 13 | 
            +
                  # @!attribute email_template
         | 
| 14 | 
            +
                  #   @return [String] Email template being used.
         | 
| 15 | 
            +
                  define_attribute :email_template, String
         | 
| 16 | 
            +
                end
         | 
| 17 | 
            +
              end
         | 
| 18 | 
            +
            end
         | 
| @@ -54,6 +54,10 @@ module Recurly | |
| 54 54 | 
             
                  #   @return [DateTime] Date invoice is due. This is the date the net terms are reached.
         | 
| 55 55 | 
             
                  define_attribute :due_at, DateTime
         | 
| 56 56 |  | 
| 57 | 
            +
                  # @!attribute dunning_campaign_id
         | 
| 58 | 
            +
                  #   @return [String] Unique ID to identify the dunning campaign used when dunning the invoice. Available when the Dunning Campaigns feature is enabled. For sites without multiple dunning campaigns enabled, this will always be the default dunning campaign.
         | 
| 59 | 
            +
                  define_attribute :dunning_campaign_id, String
         | 
| 60 | 
            +
             | 
| 57 61 | 
             
                  # @!attribute has_more_line_items
         | 
| 58 62 | 
             
                  #   @return [Boolean] Identifies if the invoice has more line items than are returned in `line_items`. If `has_more_line_items` is `true`, then a request needs to be made to the `list_invoice_line_items` endpoint.
         | 
| 59 63 | 
             
                  define_attribute :has_more_line_items, :Boolean
         | 
| @@ -15,7 +15,7 @@ module Recurly | |
| 15 15 | 
             
                  define_attribute :company, String
         | 
| 16 16 |  | 
| 17 17 | 
             
                  # @!attribute country
         | 
| 18 | 
            -
                  #   @return [String] Country, 2-letter ISO code.
         | 
| 18 | 
            +
                  #   @return [String] Country, 2-letter ISO 3166-1 alpha-2 code.
         | 
| 19 19 | 
             
                  define_attribute :country, String
         | 
| 20 20 |  | 
| 21 21 | 
             
                  # @!attribute first_name
         | 
| @@ -18,6 +18,10 @@ module Recurly | |
| 18 18 | 
             
                  #   @return [String] Visa, MasterCard, American Express, Discover, JCB, etc.
         | 
| 19 19 | 
             
                  define_attribute :card_type, String
         | 
| 20 20 |  | 
| 21 | 
            +
                  # @!attribute cc_bin_country
         | 
| 22 | 
            +
                  #   @return [String] The 2-letter ISO 3166-1 alpha-2 country code associated with the credit card BIN, if known by Recurly. Available on the BillingInfo object only. Available when the BIN country lookup feature is enabled.
         | 
| 23 | 
            +
                  define_attribute :cc_bin_country, String
         | 
| 24 | 
            +
             | 
| 21 25 | 
             
                  # @!attribute exp_month
         | 
| 22 26 | 
             
                  #   @return [Integer] Expiration month.
         | 
| 23 27 | 
             
                  define_attribute :exp_month, Integer
         | 
| @@ -46,6 +46,10 @@ module Recurly | |
| 46 46 | 
             
                  #   @return [String] Optional description, not displayed.
         | 
| 47 47 | 
             
                  define_attribute :description, String
         | 
| 48 48 |  | 
| 49 | 
            +
                  # @!attribute dunning_campaign_id
         | 
| 50 | 
            +
                  #   @return [String] Unique ID to identify a dunning campaign. Available when the Dunning Campaigns feature is enabled. Used to specify if a non-default dunning campaign should be assigned to this plan. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.
         | 
| 51 | 
            +
                  define_attribute :dunning_campaign_id, String
         | 
| 52 | 
            +
             | 
| 49 53 | 
             
                  # @!attribute hosted_pages
         | 
| 50 54 | 
             
                  #   @return [PlanHostedPages] Hosted pages settings
         | 
| 51 55 | 
             
                  define_attribute :hosted_pages, :PlanHostedPages
         | 
| @@ -19,7 +19,7 @@ module Recurly | |
| 19 19 | 
             
                  define_attribute :company, String
         | 
| 20 20 |  | 
| 21 21 | 
             
                  # @!attribute country
         | 
| 22 | 
            -
                  #   @return [String] Country, 2-letter ISO code.
         | 
| 22 | 
            +
                  #   @return [String] Country, 2-letter ISO 3166-1 alpha-2 code.
         | 
| 23 23 | 
             
                  define_attribute :country, String
         | 
| 24 24 |  | 
| 25 25 | 
             
                  # @!attribute created_at
         | 
| @@ -15,7 +15,7 @@ module Recurly | |
| 15 15 | 
             
                  define_attribute :region, String
         | 
| 16 16 |  | 
| 17 17 | 
             
                  # @!attribute tax_details
         | 
| 18 | 
            -
                  #   @return [Array[TaxDetail]]
         | 
| 18 | 
            +
                  #   @return [Array[TaxDetail]] Provides additional tax details for Canadian Sales Tax when there is tax applied at both the country and province levels. This will only be populated for the Invoice response when fetching a single invoice and not for the InvoiceList or LineItem.
         | 
| 19 19 | 
             
                  define_attribute :tax_details, Array, { :item_type => :TaxDetail }
         | 
| 20 20 |  | 
| 21 21 | 
             
                  # @!attribute type
         | 
| @@ -87,7 +87,7 @@ module Recurly | |
| 87 87 | 
             
                  define_attribute :invoice, :InvoiceMini
         | 
| 88 88 |  | 
| 89 89 | 
             
                  # @!attribute ip_address_country
         | 
| 90 | 
            -
                  #   @return [String] IP address | 
| 90 | 
            +
                  #   @return [String] Origin IP address country, 2-letter ISO 3166-1 alpha-2 code, if known by Recurly.
         | 
| 91 91 | 
             
                  define_attribute :ip_address_country, String
         | 
| 92 92 |  | 
| 93 93 | 
             
                  # @!attribute ip_address_v4
         | 
    
        data/lib/recurly/version.rb
    CHANGED
    
    
    
        data/openapi/api.yaml
    CHANGED
    
    | @@ -219,6 +219,7 @@ x-tagGroups: | |
| 219 219 | 
             
              - site
         | 
| 220 220 | 
             
              - custom_field_definition
         | 
| 221 221 | 
             
              - shipping_method
         | 
| 222 | 
            +
              - dunning_campaigns
         | 
| 222 223 | 
             
            tags:
         | 
| 223 224 | 
             
            - name: site
         | 
| 224 225 | 
             
              x-displayName: Site
         | 
| @@ -332,6 +333,9 @@ tags: | |
| 332 333 | 
             
            - name: automated_exports
         | 
| 333 334 | 
             
              x-displayName: Automated Exports
         | 
| 334 335 | 
             
              description: Automated exports of customer data.
         | 
| 336 | 
            +
            - name: dunning_campaigns
         | 
| 337 | 
            +
              x-displayName: Dunning Campaigns
         | 
| 338 | 
            +
              description: Settings used when attempting to dun customers whose payments are declined.
         | 
| 335 339 | 
             
            paths:
         | 
| 336 340 | 
             
              "/sites":
         | 
| 337 341 | 
             
                get:
         | 
| @@ -3846,7 +3850,7 @@ paths: | |
| 3846 3850 | 
             
                      try {
         | 
| 3847 3851 | 
             
                          LineItemCreate lineItemCreate = new LineItemCreate();
         | 
| 3848 3852 | 
             
                          lineItemCreate.setCurrency("USD");
         | 
| 3849 | 
            -
                          lineItemCreate.setUnitAmount(1000. | 
| 3853 | 
            +
                          lineItemCreate.setUnitAmount(new BigDecimal("1000.0"));
         | 
| 3850 3854 | 
             
                          lineItemCreate.setType(Constants.LineItemType.CHARGE); // choose "credit" for a credit
         | 
| 3851 3855 |  | 
| 3852 3856 | 
             
                          LineItem lineItem = client.createLineItem(accountId, lineItemCreate);
         | 
| @@ -5426,7 +5430,7 @@ paths: | |
| 5426 5430 | 
             
                          List<CouponPricing> currencies = new ArrayList<CouponPricing>();
         | 
| 5427 5431 | 
             
                          CouponPricing couponPrice = new CouponPricing();
         | 
| 5428 5432 | 
             
                          couponPrice.setCurrency("USD");
         | 
| 5429 | 
            -
                          couponPrice.setDiscount(10. | 
| 5433 | 
            +
                          couponPrice.setDiscount(new BigDecimal("10.0"));
         | 
| 5430 5434 | 
             
                          currencies.add(couponPrice);
         | 
| 5431 5435 |  | 
| 5432 5436 | 
             
                          couponCreate.setCurrencies(currencies);
         | 
| @@ -8957,7 +8961,7 @@ paths: | |
| 8957 8961 | 
             
                          final InvoiceRefund invoiceRefund = new InvoiceRefund();
         | 
| 8958 8962 | 
             
                          invoiceRefund.setCreditCustomerNotes("Notes on credits");
         | 
| 8959 8963 | 
             
                          invoiceRefund.setType(Constants.InvoiceRefundType.AMOUNT); // could also be "line_items"
         | 
| 8960 | 
            -
                          invoiceRefund.setAmount( | 
| 8964 | 
            +
                          invoiceRefund.setAmount(new BigDecimal("100"));
         | 
| 8961 8965 |  | 
| 8962 8966 | 
             
                          final Invoice invoice = client.refundInvoice(invoiceId, invoiceRefund);
         | 
| 8963 8967 | 
             
                          System.out.println("Refunded invoice " + invoice.getNumber());
         | 
| @@ -9587,7 +9591,7 @@ paths: | |
| 9587 9591 | 
             
                          List<PlanPricing> currencies = new ArrayList<PlanPricing>();
         | 
| 9588 9592 | 
             
                          PlanPricing planPrice = new PlanPricing();
         | 
| 9589 9593 | 
             
                          planPrice.setCurrency("USD");
         | 
| 9590 | 
            -
                          planPrice.setUnitAmount(10000 | 
| 9594 | 
            +
                          planPrice.setUnitAmount(new BigDecimal("10000"));
         | 
| 9591 9595 | 
             
                          currencies.add(planPrice);
         | 
| 9592 9596 |  | 
| 9593 9597 | 
             
                          planCreate.setCurrencies(currencies);
         | 
| @@ -10256,7 +10260,7 @@ paths: | |
| 10256 10260 | 
             
                          List<AddOnPricing> currencies = new ArrayList<AddOnPricing>();
         | 
| 10257 10261 | 
             
                          AddOnPricing addOnPrice = new AddOnPricing();
         | 
| 10258 10262 | 
             
                          addOnPrice.setCurrency("USD");
         | 
| 10259 | 
            -
                          addOnPrice.setUnitAmount(10000. | 
| 10263 | 
            +
                          addOnPrice.setUnitAmount(new BigDecimal("10000.0"));
         | 
| 10260 10264 | 
             
                          currencies.add(addOnPrice);
         | 
| 10261 10265 |  | 
| 10262 10266 | 
             
                          addOnCreate.setCurrencies(currencies);
         | 
| @@ -12434,6 +12438,43 @@ paths: | |
| 12434 12438 | 
             
                          schema:
         | 
| 12435 12439 | 
             
                            "$ref": "#/components/schemas/Error"
         | 
| 12436 12440 | 
             
                  x-code-samples: []
         | 
| 12441 | 
            +
              "/subscriptions/{subscription_id}/preview_renewal":
         | 
| 12442 | 
            +
                get:
         | 
| 12443 | 
            +
                  tags:
         | 
| 12444 | 
            +
                  - subscription
         | 
| 12445 | 
            +
                  operationId: get_preview_renewal
         | 
| 12446 | 
            +
                  summary: Fetch a preview of a subscription's renewal invoice(s)
         | 
| 12447 | 
            +
                  description: The subscriptions's renewal invoice(s) will be returned if they
         | 
| 12448 | 
            +
                    exist; if they don't (for example, if the subscription is not set to renew),
         | 
| 12449 | 
            +
                    it will return an result with no invoices.
         | 
| 12450 | 
            +
                  parameters:
         | 
| 12451 | 
            +
                  - "$ref": "#/components/parameters/subscription_id"
         | 
| 12452 | 
            +
                  responses:
         | 
| 12453 | 
            +
                    '200':
         | 
| 12454 | 
            +
                      description: A preview of the subscription's renewal invoice(s).
         | 
| 12455 | 
            +
                      content:
         | 
| 12456 | 
            +
                        application/json:
         | 
| 12457 | 
            +
                          schema:
         | 
| 12458 | 
            +
                            "$ref": "#/components/schemas/InvoiceCollection"
         | 
| 12459 | 
            +
                    '400':
         | 
| 12460 | 
            +
                      description: Invalid or unpermitted parameter.
         | 
| 12461 | 
            +
                      content:
         | 
| 12462 | 
            +
                        application/json:
         | 
| 12463 | 
            +
                          schema:
         | 
| 12464 | 
            +
                            "$ref": "#/components/schemas/Error"
         | 
| 12465 | 
            +
                    '404':
         | 
| 12466 | 
            +
                      description: Incorrect site ID or subscription ID.
         | 
| 12467 | 
            +
                      content:
         | 
| 12468 | 
            +
                        application/json:
         | 
| 12469 | 
            +
                          schema:
         | 
| 12470 | 
            +
                            "$ref": "#/components/schemas/Error"
         | 
| 12471 | 
            +
                    default:
         | 
| 12472 | 
            +
                      description: Unexpected error.
         | 
| 12473 | 
            +
                      content:
         | 
| 12474 | 
            +
                        application/json:
         | 
| 12475 | 
            +
                          schema:
         | 
| 12476 | 
            +
                            "$ref": "#/components/schemas/Error"
         | 
| 12477 | 
            +
                  x-code-samples: []
         | 
| 12437 12478 | 
             
              "/subscriptions/{subscription_id}/change":
         | 
| 12438 12479 | 
             
                get:
         | 
| 12439 12480 | 
             
                  tags:
         | 
| @@ -13891,7 +13932,14 @@ paths: | |
| 13891 13932 | 
             
                          // why. You can find the invalid params and reasons in e.getError().getParams()
         | 
| 13892 13933 | 
             
                          System.out.println("Failed validation: " + e.getError().getMessage());
         | 
| 13893 13934 | 
             
                          System.out.println("Params: " + e.getError().getParams());
         | 
| 13894 | 
            -
                      } catch ( | 
| 13935 | 
            +
                      } catch (TransactionException e) {
         | 
| 13936 | 
            +
                          TransactionError tError = e.getError().getTransactionError();
         | 
| 13937 | 
            +
                          if (tError.getCategory() == Constants.ErrorCategory.THREE_D_SECURE_ACTION_REQUIRED) {
         | 
| 13938 | 
            +
                              String actionTokenId = tError.getThreeDSecureActionTokenId();
         | 
| 13939 | 
            +
                              System.out.println("Got 3DSecure TransactionError token: " + actionTokenId);
         | 
| 13940 | 
            +
                          }
         | 
| 13941 | 
            +
                      }
         | 
| 13942 | 
            +
                      catch (ApiException e) {
         | 
| 13895 13943 | 
             
                          // Use ApiException to catch a generic error from the API
         | 
| 13896 13944 | 
             
                          System.out.println("Unexpected Recurly Error: " + e.getError().getMessage());
         | 
| 13897 13945 | 
             
                      }
         | 
| @@ -14388,6 +14436,107 @@ paths: | |
| 14388 14436 | 
             
                      err.(*recurly.Error); ok {\n\tfmt.Printf(\"Unexpected Recurly error: %v\",
         | 
| 14389 14437 | 
             
                      e)\n\treturn nil, err\n}\n\nfor _, file := range exportFiles.Files {\n\tfmt.Println(\"Export
         | 
| 14390 14438 | 
             
                      file download URL: \", file.Href)\n}"
         | 
| 14439 | 
            +
              "/dunning_campaigns":
         | 
| 14440 | 
            +
                get:
         | 
| 14441 | 
            +
                  tags:
         | 
| 14442 | 
            +
                  - dunning_campaigns
         | 
| 14443 | 
            +
                  operationId: list_dunning_campaigns
         | 
| 14444 | 
            +
                  summary: Show the dunning campaigns for a site
         | 
| 14445 | 
            +
                  description: See the [Pagination Guide](/guides/pagination.html) to learn how
         | 
| 14446 | 
            +
                    to use pagination in the API and Client Libraries.
         | 
| 14447 | 
            +
                  parameters:
         | 
| 14448 | 
            +
                  - "$ref": "#/components/parameters/sort_dates"
         | 
| 14449 | 
            +
                  responses:
         | 
| 14450 | 
            +
                    '200':
         | 
| 14451 | 
            +
                      description: A list of the the dunning_campaigns on an account.
         | 
| 14452 | 
            +
                      content:
         | 
| 14453 | 
            +
                        application/json:
         | 
| 14454 | 
            +
                          schema:
         | 
| 14455 | 
            +
                            "$ref": "#/components/schemas/DunningCampaignList"
         | 
| 14456 | 
            +
                    '404':
         | 
| 14457 | 
            +
                      description: Incorrect site.
         | 
| 14458 | 
            +
                      content:
         | 
| 14459 | 
            +
                        application/json:
         | 
| 14460 | 
            +
                          schema:
         | 
| 14461 | 
            +
                            "$ref": "#/components/schemas/Error"
         | 
| 14462 | 
            +
                    default:
         | 
| 14463 | 
            +
                      description: Unexpected error.
         | 
| 14464 | 
            +
                      content:
         | 
| 14465 | 
            +
                        application/json:
         | 
| 14466 | 
            +
                          schema:
         | 
| 14467 | 
            +
                            "$ref": "#/components/schemas/Error"
         | 
| 14468 | 
            +
                  x-code-samples: []
         | 
| 14469 | 
            +
              "/dunning_campaigns/{dunning_campaign_id}":
         | 
| 14470 | 
            +
                parameters:
         | 
| 14471 | 
            +
                - "$ref": "#/components/parameters/dunning_campaign_id"
         | 
| 14472 | 
            +
                get:
         | 
| 14473 | 
            +
                  tags:
         | 
| 14474 | 
            +
                  - dunning_campaigns
         | 
| 14475 | 
            +
                  operationId: get_dunning_campaign
         | 
| 14476 | 
            +
                  summary: Show the settings for a dunning campaign
         | 
| 14477 | 
            +
                  responses:
         | 
| 14478 | 
            +
                    '200':
         | 
| 14479 | 
            +
                      description: Settings for a dunning campaign.
         | 
| 14480 | 
            +
                      content:
         | 
| 14481 | 
            +
                        application/json:
         | 
| 14482 | 
            +
                          schema:
         | 
| 14483 | 
            +
                            "$ref": "#/components/schemas/DunningCampaign"
         | 
| 14484 | 
            +
                    '400':
         | 
| 14485 | 
            +
                      description: Bad request; perhaps missing or invalid parameters.
         | 
| 14486 | 
            +
                      content:
         | 
| 14487 | 
            +
                        application/json:
         | 
| 14488 | 
            +
                          schema:
         | 
| 14489 | 
            +
                            "$ref": "#/components/schemas/Error"
         | 
| 14490 | 
            +
                    '404':
         | 
| 14491 | 
            +
                      description: Incorrect site or campaign ID.
         | 
| 14492 | 
            +
                      content:
         | 
| 14493 | 
            +
                        application/json:
         | 
| 14494 | 
            +
                          schema:
         | 
| 14495 | 
            +
                            "$ref": "#/components/schemas/Error"
         | 
| 14496 | 
            +
                    default:
         | 
| 14497 | 
            +
                      description: Unexpected error.
         | 
| 14498 | 
            +
                      content:
         | 
| 14499 | 
            +
                        application/json:
         | 
| 14500 | 
            +
                          schema:
         | 
| 14501 | 
            +
                            "$ref": "#/components/schemas/Error"
         | 
| 14502 | 
            +
                  x-code-samples: []
         | 
| 14503 | 
            +
              "/dunning_campaigns/{dunning_campaign_id}/bulk_update":
         | 
| 14504 | 
            +
                put:
         | 
| 14505 | 
            +
                  tags:
         | 
| 14506 | 
            +
                  - dunning_campaigns
         | 
| 14507 | 
            +
                  operationId: put_dunning_campaign_bulk_update
         | 
| 14508 | 
            +
                  summary: Assign a dunning campaign to multiple plans
         | 
| 14509 | 
            +
                  requestBody:
         | 
| 14510 | 
            +
                    content:
         | 
| 14511 | 
            +
                      application/json:
         | 
| 14512 | 
            +
                        schema:
         | 
| 14513 | 
            +
                          "$ref": "#/components/schemas/DunningCampaignsBulkUpdate"
         | 
| 14514 | 
            +
                  responses:
         | 
| 14515 | 
            +
                    '200':
         | 
| 14516 | 
            +
                      description: A list of updated plans.
         | 
| 14517 | 
            +
                      content:
         | 
| 14518 | 
            +
                        application/json:
         | 
| 14519 | 
            +
                          schema:
         | 
| 14520 | 
            +
                            "$ref": "#/components/schemas/DunningCampaignsBulkUpdateResponse"
         | 
| 14521 | 
            +
                    '400':
         | 
| 14522 | 
            +
                      description: Bad request; perhaps missing or invalid parameters.
         | 
| 14523 | 
            +
                      content:
         | 
| 14524 | 
            +
                        application/json:
         | 
| 14525 | 
            +
                          schema:
         | 
| 14526 | 
            +
                            "$ref": "#/components/schemas/Error"
         | 
| 14527 | 
            +
                    '404':
         | 
| 14528 | 
            +
                      description: Incorrect site or campaign ID.
         | 
| 14529 | 
            +
                      content:
         | 
| 14530 | 
            +
                        application/json:
         | 
| 14531 | 
            +
                          schema:
         | 
| 14532 | 
            +
                            "$ref": "#/components/schemas/Error"
         | 
| 14533 | 
            +
                    default:
         | 
| 14534 | 
            +
                      description: Unexpected error.
         | 
| 14535 | 
            +
                      content:
         | 
| 14536 | 
            +
                        application/json:
         | 
| 14537 | 
            +
                          schema:
         | 
| 14538 | 
            +
                            "$ref": "#/components/schemas/Error"
         | 
| 14539 | 
            +
                  x-code-samples: []
         | 
| 14391 14540 | 
             
            servers:
         | 
| 14392 14541 | 
             
            - url: https://v3.recurly.com
         | 
| 14393 14542 | 
             
            components:
         | 
| @@ -14531,6 +14680,13 @@ components: | |
| 14531 14680 | 
             
                  required: true
         | 
| 14532 14681 | 
             
                  schema:
         | 
| 14533 14682 | 
             
                    type: string
         | 
| 14683 | 
            +
                dunning_campaign_id:
         | 
| 14684 | 
            +
                  name: dunning_campaign_id
         | 
| 14685 | 
            +
                  in: path
         | 
| 14686 | 
            +
                  description: Dunning Campaign ID, e.g. `e28zov4fw0v2`.
         | 
| 14687 | 
            +
                  required: true
         | 
| 14688 | 
            +
                  schema:
         | 
| 14689 | 
            +
                    type: string
         | 
| 14534 14690 | 
             
                ids:
         | 
| 14535 14691 | 
             
                  name: ids
         | 
| 14536 14692 | 
             
                  in: query
         | 
| @@ -15280,6 +15436,14 @@ components: | |
| 15280 15436 | 
             
                        created by this request. Supports 'moto' value, which is the acronym for
         | 
| 15281 15437 | 
             
                        mail order and telephone transactions.
         | 
| 15282 15438 | 
             
                      "$ref": "#/components/schemas/GatewayTransactionTypeEnum"
         | 
| 15439 | 
            +
                    dunning_campaign_id:
         | 
| 15440 | 
            +
                      type: string
         | 
| 15441 | 
            +
                      title: Dunning Campaign ID
         | 
| 15442 | 
            +
                      description: Unique ID to identify a dunning campaign. Available when the
         | 
| 15443 | 
            +
                        Dunning Campaigns feature is enabled. Used to specify if a non-default
         | 
| 15444 | 
            +
                        dunning campaign should be assigned to this account. For sites without
         | 
| 15445 | 
            +
                        multiple dunning campaigns enabled, the default dunning campaign will
         | 
| 15446 | 
            +
                        always be used.
         | 
| 15283 15447 | 
             
                    address:
         | 
| 15284 15448 | 
             
                      "$ref": "#/components/schemas/Address"
         | 
| 15285 15449 | 
             
                    billing_info:
         | 
| @@ -15350,6 +15514,14 @@ components: | |
| 15350 15514 | 
             
                        specifically whether the account is self-paying or will rely on the parent
         | 
| 15351 15515 | 
             
                        account to pay.
         | 
| 15352 15516 | 
             
                      "$ref": "#/components/schemas/BillToEnum"
         | 
| 15517 | 
            +
                    dunning_campaign_id:
         | 
| 15518 | 
            +
                      type: string
         | 
| 15519 | 
            +
                      title: Dunning Campaign ID
         | 
| 15520 | 
            +
                      description: Unique ID to identify a dunning campaign. Available when the
         | 
| 15521 | 
            +
                        Dunning Campaigns feature is enabled. Used to specify if a non-default
         | 
| 15522 | 
            +
                        dunning campaign should be assigned to this account. For sites without
         | 
| 15523 | 
            +
                        multiple dunning campaigns enabled, the default dunning campaign will
         | 
| 15524 | 
            +
                        always be used.
         | 
| 15353 15525 | 
             
                    address:
         | 
| 15354 15526 | 
             
                      "$ref": "#/components/schemas/Address"
         | 
| 15355 15527 | 
             
                    billing_info:
         | 
| @@ -15415,6 +15587,14 @@ components: | |
| 15415 15587 | 
             
                    bill_to:
         | 
| 15416 15588 | 
             
                      type: string
         | 
| 15417 15589 | 
             
                      maxLength: 6
         | 
| 15590 | 
            +
                    dunning_campaign_id:
         | 
| 15591 | 
            +
                      type: string
         | 
| 15592 | 
            +
                      title: Dunning Campaign ID
         | 
| 15593 | 
            +
                      description: Unique ID to identify a dunning campaign. Available when the
         | 
| 15594 | 
            +
                        Dunning Campaigns feature is enabled. Used to specify if a non-default
         | 
| 15595 | 
            +
                        dunning campaign should be assigned to this account. For sites without
         | 
| 15596 | 
            +
                        multiple dunning campaigns enabled, the default dunning campaign will
         | 
| 15597 | 
            +
                        always be used.
         | 
| 15418 15598 | 
             
                AccountBalance:
         | 
| 15419 15599 | 
             
                  type: object
         | 
| 15420 15600 | 
             
                  properties:
         | 
| @@ -15482,7 +15662,7 @@ components: | |
| 15482 15662 | 
             
                    country:
         | 
| 15483 15663 | 
             
                      type: string
         | 
| 15484 15664 | 
             
                      title: Country
         | 
| 15485 | 
            -
                      description: Country, 2-letter ISO code.
         | 
| 15665 | 
            +
                      description: Country, 2-letter ISO 3166-1 alpha-2 code.
         | 
| 15486 15666 | 
             
                AddressWithName:
         | 
| 15487 15667 | 
             
                  allOf:
         | 
| 15488 15668 | 
             
                  - "$ref": "#/components/schemas/Address"
         | 
| @@ -16066,7 +16246,8 @@ components: | |
| 16066 16246 | 
             
                          maxLength: 20
         | 
| 16067 16247 | 
             
                        country:
         | 
| 16068 16248 | 
             
                          type: string
         | 
| 16069 | 
            -
                          description: Country  | 
| 16249 | 
            +
                          description: Country, 2-letter ISO 3166-1 alpha-2 code matching the
         | 
| 16250 | 
            +
                            origin IP address, if known by Recurly.
         | 
| 16070 16251 | 
             
                          maxLength: 2
         | 
| 16071 16252 | 
             
                BillingInfoCreate:
         | 
| 16072 16253 | 
             
                  type: object
         | 
| @@ -16156,11 +16337,12 @@ components: | |
| 16156 16337 | 
             
                    tax_identifier:
         | 
| 16157 16338 | 
             
                      type: string
         | 
| 16158 16339 | 
             
                      description: Tax identifier is required if adding a billing info that is
         | 
| 16159 | 
            -
                        a consumer card in Brazil. This would be the customer's | 
| 16160 | 
            -
                         | 
| 16340 | 
            +
                        a consumer card in Brazil or in Argentina. This would be the customer's
         | 
| 16341 | 
            +
                        CPF (Brazil) and CUIT (Argentina). CPF and CUIT are tax identifiers for
         | 
| 16342 | 
            +
                        all residents who pay taxes in Brazil and Argentina respectively.
         | 
| 16161 16343 | 
             
                    tax_identifier_type:
         | 
| 16162 | 
            -
                      description:  | 
| 16163 | 
            -
                        info that is an elo or hipercard type in Brazil.
         | 
| 16344 | 
            +
                      description: This field and a value of `cpf` or `cuit` are required if adding
         | 
| 16345 | 
            +
                        a billing info that is an elo or hipercard type in Brazil or in Argentina.
         | 
| 16164 16346 | 
             
                      "$ref": "#/components/schemas/TaxIdentifierTypeEnum"
         | 
| 16165 16347 | 
             
                    primary_payment_method:
         | 
| 16166 16348 | 
             
                      type: boolean
         | 
| @@ -17329,6 +17511,13 @@ components: | |
| 17329 17511 | 
             
                      format: date-time
         | 
| 17330 17512 | 
             
                      title: Closed at
         | 
| 17331 17513 | 
             
                      description: Date invoice was marked paid or failed.
         | 
| 17514 | 
            +
                    dunning_campaign_id:
         | 
| 17515 | 
            +
                      type: string
         | 
| 17516 | 
            +
                      title: Dunning Campaign ID
         | 
| 17517 | 
            +
                      description: Unique ID to identify the dunning campaign used when dunning
         | 
| 17518 | 
            +
                        the invoice. Available when the Dunning Campaigns feature is enabled.
         | 
| 17519 | 
            +
                        For sites without multiple dunning campaigns enabled, this will always
         | 
| 17520 | 
            +
                        be the default dunning campaign.
         | 
| 17332 17521 | 
             
                InvoiceCreate:
         | 
| 17333 17522 | 
             
                  type: object
         | 
| 17334 17523 | 
             
                  properties:
         | 
| @@ -18241,6 +18430,14 @@ components: | |
| 18241 18430 | 
             
                        Used to determine whether items can be assigned as add-ons to individual subscriptions.
         | 
| 18242 18431 | 
             
                        If `true`, items can be assigned as add-ons to individual subscription add-ons.
         | 
| 18243 18432 | 
             
                        If `false`, only plan add-ons can be used.
         | 
| 18433 | 
            +
                    dunning_campaign_id:
         | 
| 18434 | 
            +
                      type: string
         | 
| 18435 | 
            +
                      title: Dunning Campaign ID
         | 
| 18436 | 
            +
                      description: Unique ID to identify a dunning campaign. Available when the
         | 
| 18437 | 
            +
                        Dunning Campaigns feature is enabled. Used to specify if a non-default
         | 
| 18438 | 
            +
                        dunning campaign should be assigned to this plan. For sites without multiple
         | 
| 18439 | 
            +
                        dunning campaigns enabled, the default dunning campaign will always be
         | 
| 18440 | 
            +
                        used.
         | 
| 18244 18441 | 
             
                    created_at:
         | 
| 18245 18442 | 
             
                      type: string
         | 
| 18246 18443 | 
             
                      format: date-time
         | 
| @@ -18397,6 +18594,14 @@ components: | |
| 18397 18594 | 
             
                        Used to determine whether items can be assigned as add-ons to individual subscriptions.
         | 
| 18398 18595 | 
             
                        If `true`, items can be assigned as add-ons to individual subscription add-ons.
         | 
| 18399 18596 | 
             
                        If `false`, only plan add-ons can be used.
         | 
| 18597 | 
            +
                    dunning_campaign_id:
         | 
| 18598 | 
            +
                      type: string
         | 
| 18599 | 
            +
                      title: Dunning Campaign ID
         | 
| 18600 | 
            +
                      description: Unique ID to identify a dunning campaign. Available when the
         | 
| 18601 | 
            +
                        Dunning Campaigns feature is enabled. Used to specify if a non-default
         | 
| 18602 | 
            +
                        dunning campaign should be assigned to this plan. For sites without multiple
         | 
| 18603 | 
            +
                        dunning campaigns enabled, the default dunning campaign will always be
         | 
| 18604 | 
            +
                        used.
         | 
| 18400 18605 | 
             
                  required:
         | 
| 18401 18606 | 
             
                  - code
         | 
| 18402 18607 | 
             
                  - name
         | 
| @@ -18573,6 +18778,14 @@ components: | |
| 18573 18778 | 
             
                        Used to determine whether items can be assigned as add-ons to individual subscriptions.
         | 
| 18574 18779 | 
             
                        If `true`, items can be assigned as add-ons to individual subscription add-ons.
         | 
| 18575 18780 | 
             
                        If `false`, only plan add-ons can be used.
         | 
| 18781 | 
            +
                    dunning_campaign_id:
         | 
| 18782 | 
            +
                      type: string
         | 
| 18783 | 
            +
                      title: Dunning Campaign ID
         | 
| 18784 | 
            +
                      description: Unique ID to identify a dunning campaign. Available when the
         | 
| 18785 | 
            +
                        Dunning Campaigns feature is enabled. Used to specify if a non-default
         | 
| 18786 | 
            +
                        dunning campaign should be assigned to this plan. For sites without multiple
         | 
| 18787 | 
            +
                        dunning campaigns enabled, the default dunning campaign will always be
         | 
| 18788 | 
            +
                        used.
         | 
| 18576 18789 | 
             
                AddOnPricing:
         | 
| 18577 18790 | 
             
                  type: object
         | 
| 18578 18791 | 
             
                  properties:
         | 
| @@ -18743,7 +18956,7 @@ components: | |
| 18743 18956 | 
             
                    country:
         | 
| 18744 18957 | 
             
                      type: string
         | 
| 18745 18958 | 
             
                      maxLength: 50
         | 
| 18746 | 
            -
                      description: Country, 2-letter ISO code.
         | 
| 18959 | 
            +
                      description: Country, 2-letter ISO 3166-1 alpha-2 code.
         | 
| 18747 18960 | 
             
                    created_at:
         | 
| 18748 18961 | 
             
                      type: string
         | 
| 18749 18962 | 
             
                      title: Created at
         | 
| @@ -18798,7 +19011,7 @@ components: | |
| 18798 19011 | 
             
                    country:
         | 
| 18799 19012 | 
             
                      type: string
         | 
| 18800 19013 | 
             
                      maxLength: 50
         | 
| 18801 | 
            -
                      description: Country, 2-letter ISO code.
         | 
| 19014 | 
            +
                      description: Country, 2-letter ISO 3166-1 alpha-2 code.
         | 
| 18802 19015 | 
             
                  required:
         | 
| 18803 19016 | 
             
                  - first_name
         | 
| 18804 19017 | 
             
                  - last_name
         | 
| @@ -19048,7 +19261,7 @@ components: | |
| 19048 19261 | 
             
                    country:
         | 
| 19049 19262 | 
             
                      type: string
         | 
| 19050 19263 | 
             
                      maxLength: 50
         | 
| 19051 | 
            -
                      description: Country, 2-letter ISO code.
         | 
| 19264 | 
            +
                      description: Country, 2-letter ISO 3166-1 alpha-2 code.
         | 
| 19052 19265 | 
             
                Site:
         | 
| 19053 19266 | 
             
                  type: object
         | 
| 19054 19267 | 
             
                  properties:
         | 
| @@ -19609,6 +19822,9 @@ components: | |
| 19609 19822 | 
             
                      description: A token generated by Recurly.js after completing a 3-D Secure
         | 
| 19610 19823 | 
             
                        device fingerprinting or authentication challenge.
         | 
| 19611 19824 | 
             
                      maxLength: 22
         | 
| 19825 | 
            +
                SubscriptionChangeBillingInfoCreate:
         | 
| 19826 | 
            +
                  allOf:
         | 
| 19827 | 
            +
                  - "$ref": "#/components/schemas/SubscriptionChangeBillingInfo"
         | 
| 19612 19828 | 
             
                SubscriptionChangeCreate:
         | 
| 19613 19829 | 
             
                  type: object
         | 
| 19614 19830 | 
             
                  properties:
         | 
| @@ -19713,6 +19929,8 @@ components: | |
| 19713 19929 | 
             
                        created by this request. Supports 'moto' value, which is the acronym for
         | 
| 19714 19930 | 
             
                        mail order and telephone transactions.
         | 
| 19715 19931 | 
             
                      "$ref": "#/components/schemas/GatewayTransactionTypeEnum"
         | 
| 19932 | 
            +
                    billing_info:
         | 
| 19933 | 
            +
                      "$ref": "#/components/schemas/SubscriptionChangeBillingInfoCreate"
         | 
| 19716 19934 | 
             
                SubscriptionChangeShippingCreate:
         | 
| 19717 19935 | 
             
                  type: object
         | 
| 19718 19936 | 
             
                  title: Shipping details that will be changed on a subscription
         | 
| @@ -19810,7 +20028,10 @@ components: | |
| 19810 20028 | 
             
                      format: date-time
         | 
| 19811 20029 | 
             
                      title: Trial ends at
         | 
| 19812 20030 | 
             
                      description: If set, overrides the default trial behavior for the subscription.
         | 
| 19813 | 
            -
                         | 
| 20031 | 
            +
                        When the current date time or a past date time is provided the subscription
         | 
| 20032 | 
            +
                        will begin with no trial phase (overriding any plan default trial). When
         | 
| 20033 | 
            +
                        a future date time is provided the subscription will begin with a trial
         | 
| 20034 | 
            +
                        phase ending at the specified date time.
         | 
| 19814 20035 | 
             
                    starts_at:
         | 
| 19815 20036 | 
             
                      type: string
         | 
| 19816 20037 | 
             
                      format: date-time
         | 
| @@ -19936,7 +20157,10 @@ components: | |
| 19936 20157 | 
             
                      format: date-time
         | 
| 19937 20158 | 
             
                      title: Trial ends at
         | 
| 19938 20159 | 
             
                      description: If set, overrides the default trial behavior for the subscription.
         | 
| 19939 | 
            -
                         | 
| 20160 | 
            +
                        When the current date time or a past date time is provided the subscription
         | 
| 20161 | 
            +
                        will begin with no trial phase (overriding any plan default trial). When
         | 
| 20162 | 
            +
                        a future date time is provided the subscription will begin with a trial
         | 
| 20163 | 
            +
                        phase ending at the specified date time.
         | 
| 19940 20164 | 
             
                    starts_at:
         | 
| 19941 20165 | 
             
                      type: string
         | 
| 19942 20166 | 
             
                      format: date-time
         | 
| @@ -20055,7 +20279,8 @@ components: | |
| 20055 20279 | 
             
                    remaining_pause_cycles:
         | 
| 20056 20280 | 
             
                      type: integer
         | 
| 20057 20281 | 
             
                      title: Remaining pause cycles
         | 
| 20058 | 
            -
                      description: Number of billing cycles to pause the subscriptions.
         | 
| 20282 | 
            +
                      description: Number of billing cycles to pause the subscriptions. A value
         | 
| 20283 | 
            +
                        of 0 will cancel any pending pauses on the subscription.
         | 
| 20059 20284 | 
             
                  required:
         | 
| 20060 20285 | 
             
                  - remaining_pause_cycles
         | 
| 20061 20286 | 
             
                SubscriptionShipping:
         | 
| @@ -20166,15 +20391,15 @@ components: | |
| 20166 20391 | 
             
                      title: Rate
         | 
| 20167 20392 | 
             
                    tax_details:
         | 
| 20168 20393 | 
             
                      type: array
         | 
| 20394 | 
            +
                      description: Provides additional tax details for Canadian Sales Tax when
         | 
| 20395 | 
            +
                        there is tax applied at both the country and province levels. This will
         | 
| 20396 | 
            +
                        only be populated for the Invoice response when fetching a single invoice
         | 
| 20397 | 
            +
                        and not for the InvoiceList or LineItem.
         | 
| 20169 20398 | 
             
                      items:
         | 
| 20170 20399 | 
             
                        "$ref": "#/components/schemas/TaxDetail"
         | 
| 20171 20400 | 
             
                TaxDetail:
         | 
| 20172 20401 | 
             
                  type: object
         | 
| 20173 | 
            -
                  title: Tax  | 
| 20174 | 
            -
                  description: Provides additional tax details for Canadian Sales Tax when there
         | 
| 20175 | 
            -
                    is tax applied at both the country and province levels. This will only be
         | 
| 20176 | 
            -
                    populated for the Invoice response when fetching a single invoice and not
         | 
| 20177 | 
            -
                    for the InvoiceList or LineItem.
         | 
| 20402 | 
            +
                  title: Tax detail
         | 
| 20178 20403 | 
             
                  properties:
         | 
| 20179 20404 | 
             
                    type:
         | 
| 20180 20405 | 
             
                      type: string
         | 
| @@ -20292,7 +20517,8 @@ components: | |
| 20292 20517 | 
             
                        - When the merchant enters billing information using the UI, no IP address is recorded.
         | 
| 20293 20518 | 
             
                    ip_address_country:
         | 
| 20294 20519 | 
             
                      type: string
         | 
| 20295 | 
            -
                      title: IP address | 
| 20520 | 
            +
                      title: Origin IP address country, 2-letter ISO 3166-1 alpha-2 code, if known
         | 
| 20521 | 
            +
                        by Recurly.
         | 
| 20296 20522 | 
             
                    status_code:
         | 
| 20297 20523 | 
             
                      type: string
         | 
| 20298 20524 | 
             
                      title: Status code
         | 
| @@ -20744,6 +20970,150 @@ components: | |
| 20744 20970 | 
             
                  required:
         | 
| 20745 20971 | 
             
                  - currency
         | 
| 20746 20972 | 
             
                  - account
         | 
| 20973 | 
            +
                DunningCampaign:
         | 
| 20974 | 
            +
                  type: object
         | 
| 20975 | 
            +
                  description: Settings for a dunning campaign.
         | 
| 20976 | 
            +
                  properties:
         | 
| 20977 | 
            +
                    id:
         | 
| 20978 | 
            +
                      type: string
         | 
| 20979 | 
            +
                    object:
         | 
| 20980 | 
            +
                      type: string
         | 
| 20981 | 
            +
                      title: Object type
         | 
| 20982 | 
            +
                    code:
         | 
| 20983 | 
            +
                      type: string
         | 
| 20984 | 
            +
                      description: Campaign code.
         | 
| 20985 | 
            +
                    name:
         | 
| 20986 | 
            +
                      type: string
         | 
| 20987 | 
            +
                      description: Campaign name.
         | 
| 20988 | 
            +
                    description:
         | 
| 20989 | 
            +
                      type: string
         | 
| 20990 | 
            +
                      description: Campaign description.
         | 
| 20991 | 
            +
                    default_campaign:
         | 
| 20992 | 
            +
                      type: boolean
         | 
| 20993 | 
            +
                      description: Whether or not this is the default campaign for accounts or
         | 
| 20994 | 
            +
                        plans without an assigned dunning campaign.
         | 
| 20995 | 
            +
                    dunning_cycles:
         | 
| 20996 | 
            +
                      type: array
         | 
| 20997 | 
            +
                      description: Dunning Cycle settings.
         | 
| 20998 | 
            +
                      items:
         | 
| 20999 | 
            +
                        "$ref": "#/components/schemas/DunningCycle"
         | 
| 21000 | 
            +
                    created_at:
         | 
| 21001 | 
            +
                      type: string
         | 
| 21002 | 
            +
                      format: date-time
         | 
| 21003 | 
            +
                      description: When the current campaign was created in Recurly.
         | 
| 21004 | 
            +
                    updated_at:
         | 
| 21005 | 
            +
                      type: string
         | 
| 21006 | 
            +
                      format: date-time
         | 
| 21007 | 
            +
                      description: When the current campaign was updated in Recurly.
         | 
| 21008 | 
            +
                    deleted_at:
         | 
| 21009 | 
            +
                      type: string
         | 
| 21010 | 
            +
                      format: date-time
         | 
| 21011 | 
            +
                      description: When the current campaign was deleted in Recurly.
         | 
| 21012 | 
            +
                DunningCampaignList:
         | 
| 21013 | 
            +
                  type: object
         | 
| 21014 | 
            +
                  properties:
         | 
| 21015 | 
            +
                    object:
         | 
| 21016 | 
            +
                      type: string
         | 
| 21017 | 
            +
                      title: Object type
         | 
| 21018 | 
            +
                      description: Will always be List.
         | 
| 21019 | 
            +
                    has_more:
         | 
| 21020 | 
            +
                      type: boolean
         | 
| 21021 | 
            +
                      description: Indicates there are more results on subsequent pages.
         | 
| 21022 | 
            +
                    next:
         | 
| 21023 | 
            +
                      type: string
         | 
| 21024 | 
            +
                      description: Path to subsequent page of results.
         | 
| 21025 | 
            +
                    data:
         | 
| 21026 | 
            +
                      type: array
         | 
| 21027 | 
            +
                      items:
         | 
| 21028 | 
            +
                        "$ref": "#/components/schemas/DunningCampaign"
         | 
| 21029 | 
            +
                DunningCycle:
         | 
| 21030 | 
            +
                  type: object
         | 
| 21031 | 
            +
                  properties:
         | 
| 21032 | 
            +
                    type:
         | 
| 21033 | 
            +
                      "$ref": "#/components/schemas/DunningCycleTypeEnum"
         | 
| 21034 | 
            +
                    applies_to_manual_trial:
         | 
| 21035 | 
            +
                      type: boolean
         | 
| 21036 | 
            +
                      description: Whether the dunning settings will be applied to manual trials.
         | 
| 21037 | 
            +
                        Only applies to trial cycles.
         | 
| 21038 | 
            +
                    first_communication_interval:
         | 
| 21039 | 
            +
                      type: integer
         | 
| 21040 | 
            +
                      description: The number of days after a transaction failure before the first
         | 
| 21041 | 
            +
                        dunning email is sent.
         | 
| 21042 | 
            +
                    send_immediately_on_hard_decline:
         | 
| 21043 | 
            +
                      type: boolean
         | 
| 21044 | 
            +
                      description: Whether or not to send an extra email immediately to customers
         | 
| 21045 | 
            +
                        whose initial payment attempt fails with either a hard decline or invalid
         | 
| 21046 | 
            +
                        billing info.
         | 
| 21047 | 
            +
                    intervals:
         | 
| 21048 | 
            +
                      type: array
         | 
| 21049 | 
            +
                      description: Dunning intervals.
         | 
| 21050 | 
            +
                      items:
         | 
| 21051 | 
            +
                        "$ref": "#/components/schemas/DunningInterval"
         | 
| 21052 | 
            +
                    expire_subscription:
         | 
| 21053 | 
            +
                      type: boolean
         | 
| 21054 | 
            +
                      description: Whether the subscription(s) should be cancelled at the end
         | 
| 21055 | 
            +
                        of the dunning cycle.
         | 
| 21056 | 
            +
                    fail_invoice:
         | 
| 21057 | 
            +
                      type: boolean
         | 
| 21058 | 
            +
                      description: Whether the invoice should be failed at the end of the dunning
         | 
| 21059 | 
            +
                        cycle.
         | 
| 21060 | 
            +
                    total_dunning_days:
         | 
| 21061 | 
            +
                      type: integer
         | 
| 21062 | 
            +
                      description: The number of days between the first dunning email being sent
         | 
| 21063 | 
            +
                        and the end of the dunning cycle.
         | 
| 21064 | 
            +
                    total_recycling_days:
         | 
| 21065 | 
            +
                      type: integer
         | 
| 21066 | 
            +
                      description: The number of days between a transaction failure and the end
         | 
| 21067 | 
            +
                        of the dunning cycle.
         | 
| 21068 | 
            +
                    version:
         | 
| 21069 | 
            +
                      type: integer
         | 
| 21070 | 
            +
                      description: Current campaign version.
         | 
| 21071 | 
            +
                    created_at:
         | 
| 21072 | 
            +
                      type: string
         | 
| 21073 | 
            +
                      format: date-time
         | 
| 21074 | 
            +
                      description: When the current settings were created in Recurly.
         | 
| 21075 | 
            +
                    updated_at:
         | 
| 21076 | 
            +
                      type: string
         | 
| 21077 | 
            +
                      format: date-time
         | 
| 21078 | 
            +
                      description: When the current settings were updated in Recurly.
         | 
| 21079 | 
            +
                DunningInterval:
         | 
| 21080 | 
            +
                  properties:
         | 
| 21081 | 
            +
                    days:
         | 
| 21082 | 
            +
                      type: integer
         | 
| 21083 | 
            +
                      description: Number of days before sending the next email.
         | 
| 21084 | 
            +
                    email_template:
         | 
| 21085 | 
            +
                      type: string
         | 
| 21086 | 
            +
                      description: Email template being used.
         | 
| 21087 | 
            +
                DunningCampaignsBulkUpdate:
         | 
| 21088 | 
            +
                  properties:
         | 
| 21089 | 
            +
                    plan_codes:
         | 
| 21090 | 
            +
                      type: array
         | 
| 21091 | 
            +
                      maxItems: 200
         | 
| 21092 | 
            +
                      description: List of `plan_codes` associated with the Plans for which the
         | 
| 21093 | 
            +
                        dunning campaign should be updated. Required unless `plan_ids` is present.
         | 
| 21094 | 
            +
                      items:
         | 
| 21095 | 
            +
                        type: string
         | 
| 21096 | 
            +
                    plan_ids:
         | 
| 21097 | 
            +
                      type: array
         | 
| 21098 | 
            +
                      maxItems: 200
         | 
| 21099 | 
            +
                      description: List of `plan_ids` associated with the Plans for which the
         | 
| 21100 | 
            +
                        dunning campaign should be updated. Required unless `plan_codes` is present.
         | 
| 21101 | 
            +
                      items:
         | 
| 21102 | 
            +
                        type: string
         | 
| 21103 | 
            +
                DunningCampaignsBulkUpdateResponse:
         | 
| 21104 | 
            +
                  properties:
         | 
| 21105 | 
            +
                    object:
         | 
| 21106 | 
            +
                      type: string
         | 
| 21107 | 
            +
                      title: Object type
         | 
| 21108 | 
            +
                      readOnly: true
         | 
| 21109 | 
            +
                    plans:
         | 
| 21110 | 
            +
                      type: array
         | 
| 21111 | 
            +
                      title: Plans
         | 
| 21112 | 
            +
                      description: An array containing all of the `Plan` resources that have been
         | 
| 21113 | 
            +
                        updated.
         | 
| 21114 | 
            +
                      maxItems: 200
         | 
| 21115 | 
            +
                      items:
         | 
| 21116 | 
            +
                        "$ref": "#/components/schemas/Plan"
         | 
| 20747 21117 | 
             
                PaymentMethod:
         | 
| 20748 21118 | 
             
                  properties:
         | 
| 20749 21119 | 
             
                    object:
         | 
| @@ -20777,6 +21147,11 @@ components: | |
| 20777 21147 | 
             
                      description: A token used in place of a credit card in order to perform
         | 
| 20778 21148 | 
             
                        transactions.
         | 
| 20779 21149 | 
             
                      maxLength: 50
         | 
| 21150 | 
            +
                    cc_bin_country:
         | 
| 21151 | 
            +
                      type: string
         | 
| 21152 | 
            +
                      description: The 2-letter ISO 3166-1 alpha-2 country code associated with
         | 
| 21153 | 
            +
                        the credit card BIN, if known by Recurly. Available on the BillingInfo
         | 
| 21154 | 
            +
                        object only. Available when the BIN country lookup feature is enabled.
         | 
| 20780 21155 | 
             
                    gateway_code:
         | 
| 20781 21156 | 
             
                      type: string
         | 
| 20782 21157 | 
             
                      description: An identifier for a specific payment gateway.
         | 
| @@ -21378,6 +21753,7 @@ components: | |
| 21378 21753 | 
             
                  - Union Pay
         | 
| 21379 21754 | 
             
                  - Unknown
         | 
| 21380 21755 | 
             
                  - Visa
         | 
| 21756 | 
            +
                  - Tarjeta Naranja
         | 
| 21381 21757 | 
             
                AccountTypeEnum:
         | 
| 21382 21758 | 
             
                  type: string
         | 
| 21383 21759 | 
             
                  enum:
         | 
| @@ -21497,6 +21873,7 @@ components: | |
| 21497 21873 | 
             
                  - invalid_data
         | 
| 21498 21874 | 
             
                  - invalid_email
         | 
| 21499 21875 | 
             
                  - invalid_gateway_configuration
         | 
| 21876 | 
            +
                  - invalid_gateway_access_token
         | 
| 21500 21877 | 
             
                  - invalid_issuer
         | 
| 21501 21878 | 
             
                  - invalid_login
         | 
| 21502 21879 | 
             
                  - invalid_merchant_type
         | 
| @@ -21589,3 +21966,11 @@ components: | |
| 21589 21966 | 
             
                  type: string
         | 
| 21590 21967 | 
             
                  enum:
         | 
| 21591 21968 | 
             
                  - cpf
         | 
| 21969 | 
            +
                  - cuit
         | 
| 21970 | 
            +
                DunningCycleTypeEnum:
         | 
| 21971 | 
            +
                  type: string
         | 
| 21972 | 
            +
                  description: The type of invoice this cycle applies to.
         | 
| 21973 | 
            +
                  enum:
         | 
| 21974 | 
            +
                  - automatic
         | 
| 21975 | 
            +
                  - manual
         | 
| 21976 | 
            +
                  - trial
         |