openapi/api.yaml in recurly-4.1.0 vs openapi/api.yaml in recurly-4.2.0

- old
+ new

@@ -545,11 +545,10 @@ operationId: list_accounts summary: List a site's accounts description: See the [Pagination Guide](/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/ids" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/sort_dates" - "$ref": "#/components/parameters/filter_begin_time" @@ -648,12 +647,10 @@ post: tags: - account operationId: create_account summary: Create an account - parameters: - - "$ref": "#/components/parameters/site_id" requestBody: content: application/json: schema: "$ref": "#/components/schemas/AccountCreate" @@ -897,11 +894,10 @@ validation: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected Recurly error: %v\", e)\n\treturn nil, err\n}\nfmt.Printf(\"Created Account: %s\", account.Id)" "/accounts/{account_id}": parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/account_id" get: tags: - account operationId: get_account @@ -1286,11 +1282,10 @@ not found: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected Recurly error: %v\", e)\n\treturn nil, err\n}\nfmt.Printf(\"Deactivated Account: %s\", account.Id)" "/accounts/{account_id}/acquisition": parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/account_id" get: tags: - account_acquisition operationId: get_account_acquisition @@ -1666,11 +1661,10 @@ not found: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected Recurly error: %v\", e)\n\treturn nil, err\n}\nfmt.Printf(\"Removed Account Acquisition: %s\", accountAcquisition.Id)" "/accounts/{account_id}/reactivate": parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/account_id" put: tags: - account operationId: reactivate_account @@ -1790,11 +1784,10 @@ validation: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected Recurly error: %v\", e)\n\treturn nil, err\n}\nfmt.Printf(\"Reactivated Account: %s\", account.Id)" "/accounts/{account_id}/balance": parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/account_id" get: tags: - account operationId: get_account_balance @@ -1912,11 +1905,10 @@ tags: - billing_info operationId: get_billing_info summary: Fetch an account's billing information parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/account_id" responses: '200': description: An account's billing information. content: @@ -2048,11 +2040,10 @@ - first_name - last_name - gateway_token - gateway_code parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/account_id" requestBody: content: application/json: schema: @@ -2203,11 +2194,10 @@ tags: - billing_info operationId: remove_billing_info summary: Remove an account's billing information parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/account_id" description: You may remove any stored billing information for an account. If the account has a subscription, the renewal will go into dunning unless the billing information is updated before the renewal occurs. responses: @@ -2314,11 +2304,10 @@ operationId: list_billing_infos summary: Get the list of billing information associated with an account description: See the [Pagination Guide](/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/account_id" - "$ref": "#/components/parameters/ids" - "$ref": "#/components/parameters/sort_dates" - "$ref": "#/components/parameters/filter_begin_time" - "$ref": "#/components/parameters/filter_end_time" @@ -2365,11 +2354,10 @@ - first_name - last_name - gateway_token - gateway_code parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/account_id" requestBody: content: application/json: schema: @@ -2407,11 +2395,10 @@ tags: - billing_info operationId: get_a_billing_info summary: Fetch a billing info parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/account_id" - "$ref": "#/components/parameters/billing_info_id" responses: '200': description: A billing info. @@ -2449,11 +2436,10 @@ - first_name - last_name - gateway_token - gateway_code parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/account_id" - "$ref": "#/components/parameters/billing_info_id" requestBody: content: application/json: @@ -2491,11 +2477,10 @@ tags: - billing_info operationId: remove_a_billing_info summary: Remove an account's billing information parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/account_id" - "$ref": "#/components/parameters/billing_info_id" description: You may remove any stored billing information for an account. If the account has a subscription, the renewal will go into dunning unless the billing information is updated before the renewal occurs. @@ -2524,11 +2509,10 @@ operationId: list_account_coupon_redemptions summary: Show the coupon redemptions for an account description: See the [Pagination Guide](/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/account_id" - "$ref": "#/components/parameters/ids" - "$ref": "#/components/parameters/sort_dates" - "$ref": "#/components/parameters/filter_begin_time" - "$ref": "#/components/parameters/filter_end_time" @@ -2622,11 +2606,10 @@ operationId: list_active_coupon_redemptions summary: Show the coupon redemptions that are active on an account description: See the [Pagination Guide](/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/account_id" responses: '200': description: Active coupon redemptions on an account. content: @@ -2705,11 +2688,10 @@ tags: - coupon_redemption operationId: create_coupon_redemption summary: Generate an active coupon redemption on an account or subscription parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/account_id" requestBody: content: application/json: schema: @@ -2836,11 +2818,10 @@ tags: - coupon_redemption operationId: remove_coupon_redemption summary: Delete the active coupon redemption from an account parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/account_id" responses: '200': description: Coupon redemption deleted. content: @@ -2953,11 +2934,10 @@ operationId: list_account_credit_payments summary: List an account's credit payments description: See the [Pagination Guide](/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/account_id" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/sort_dates" - "$ref": "#/components/parameters/filter_begin_time" @@ -3061,11 +3041,10 @@ operationId: list_account_invoices summary: List an account's invoices description: See the [Pagination Guide](/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/account_id" - "$ref": "#/components/parameters/ids" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/sort_dates" @@ -3163,11 +3142,10 @@ tags: - invoice operationId: create_invoice summary: Create an invoice for pending line items parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/account_id" requestBody: content: application/json: schema: @@ -3334,11 +3312,10 @@ tags: - invoice operationId: preview_invoice summary: Preview new invoice for pending line items parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/account_id" requestBody: content: application/json: schema: @@ -3506,11 +3483,10 @@ operationId: list_account_line_items summary: List an account's line items description: See the [Pagination Guide](/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/account_id" - "$ref": "#/components/parameters/ids" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/sort_dates" @@ -3611,11 +3587,10 @@ tags: - line_item operationId: create_line_item summary: Create a new line item for the account parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/account_id" requestBody: content: application/json: schema: @@ -3782,11 +3757,10 @@ operationId: list_account_notes summary: Fetch a list of an account's notes description: See the [Pagination Guide](/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/account_id" - "$ref": "#/components/parameters/ids" responses: '200': description: A list of an account's notes. @@ -3869,11 +3843,10 @@ tags: - note operationId: get_account_note summary: Fetch an account note parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/account_id" - name: account_note_id in: path description: Account Note ID. required: true @@ -3998,11 +3971,10 @@ operationId: list_shipping_addresses summary: Fetch a list of an account's shipping addresses description: See the [Pagination Guide](/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/account_id" - "$ref": "#/components/parameters/ids" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/sort_dates" @@ -4093,11 +4065,10 @@ tags: - shipping_address operationId: create_shipping_address summary: Create a new shipping address for the account parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/account_id" requestBody: content: application/json: schema: @@ -4283,11 +4254,10 @@ tags: - shipping_address operationId: get_shipping_address summary: Fetch an account's shipping address parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/account_id" - "$ref": "#/components/parameters/shipping_address_id" responses: '200': description: A shipping address. @@ -4403,11 +4373,10 @@ tags: - shipping_address operationId: update_shipping_address summary: Update an account's shipping address parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/account_id" - "$ref": "#/components/parameters/shipping_address_id" requestBody: content: application/json: @@ -4574,11 +4543,10 @@ tags: - shipping_address operationId: remove_shipping_address summary: Remove an account's shipping address parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/account_id" - "$ref": "#/components/parameters/shipping_address_id" responses: '204': description: Shipping address deleted. @@ -4685,11 +4653,10 @@ operationId: list_account_subscriptions summary: List an account's subscriptions description: See the [Pagination Guide](/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/account_id" - "$ref": "#/components/parameters/ids" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/sort_dates" @@ -4790,11 +4757,10 @@ operationId: list_account_transactions summary: List an account's transactions description: See the [Pagination Guide](/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/account_id" - "$ref": "#/components/parameters/ids" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/sort_dates" @@ -4897,11 +4863,10 @@ operationId: list_child_accounts summary: List an account's child accounts description: See the [Pagination Guide](/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/account_id" - "$ref": "#/components/parameters/ids" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/sort_dates" @@ -4981,11 +4946,10 @@ operationId: list_account_acquisition summary: List a site's account acquisition data description: See the [Pagination Guide](/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/ids" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/sort_dates" - "$ref": "#/components/parameters/filter_begin_time" @@ -5081,11 +5045,10 @@ operationId: list_coupons summary: List a site's coupons description: See the [Pagination Guide](/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/ids" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/sort_dates" - "$ref": "#/components/parameters/filter_begin_time" @@ -5181,12 +5144,10 @@ post: tags: - coupon operationId: create_coupon summary: Create a new coupon - parameters: - - "$ref": "#/components/parameters/site_id" requestBody: content: application/json: schema: "$ref": "#/components/schemas/CouponCreate" @@ -5382,11 +5343,10 @@ tags: - coupon operationId: get_coupon summary: Fetch a coupon parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/coupon_id" responses: '200': description: A coupon. content: @@ -5498,11 +5458,10 @@ tags: - coupon operationId: update_coupon summary: Update an active coupon parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/coupon_id" requestBody: content: application/json: schema: @@ -5652,11 +5611,10 @@ tags: - coupon operationId: deactivate_coupon summary: Expire a coupon parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/coupon_id" description: Mark an existing Coupon as expired responses: '200': description: The expired Coupon @@ -5758,11 +5716,10 @@ tags: - unique_coupon_code operationId: generate_unique_coupon_codes summary: Generate unique coupon codes parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/coupon_id" requestBody: content: application/json: schema: @@ -5804,11 +5761,10 @@ operationId: restore_coupon summary: Restore an inactive coupon description: Make an expired coupon redeemable again. You can change editable fields in this call. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/coupon_id" requestBody: content: application/json: schema: @@ -5853,11 +5809,10 @@ operationId: list_unique_coupon_codes summary: List unique coupon codes associated with a bulk coupon description: See the [Pagination Guide](/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/coupon_id" - "$ref": "#/components/parameters/ids" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/sort_dates" @@ -5890,11 +5845,10 @@ operationId: list_credit_payments summary: List a site's credit payments description: See the [Pagination Guide](/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/sort_dates" - "$ref": "#/components/parameters/filter_begin_time" - "$ref": "#/components/parameters/filter_end_time" @@ -5991,11 +5945,10 @@ tags: - credit_payment operationId: get_credit_payment summary: Fetch a credit payment parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/credit_payment_id" responses: '200': description: A credit payment. content: @@ -6022,11 +5975,10 @@ operationId: list_custom_field_definitions summary: List a site's custom field definitions description: See the [Pagination Guide](/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/ids" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/sort_dates" - "$ref": "#/components/parameters/filter_begin_time" @@ -6130,11 +6082,10 @@ tags: - custom_field_definition operationId: get_custom_field_definition summary: Fetch an custom field definition parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/custom_field_definition_id" responses: '200': description: An custom field definition. content: @@ -6249,11 +6200,10 @@ operationId: list_items summary: List a site's items description: See the [Pagination Guide](/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/ids" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/sort_dates" - "$ref": "#/components/parameters/filter_begin_time" @@ -6350,12 +6300,10 @@ post: tags: - item operationId: create_item summary: Create a new item - parameters: - - "$ref": "#/components/parameters/site_id" requestBody: content: application/json: schema: "$ref": "#/components/schemas/ItemCreate" @@ -6564,11 +6512,10 @@ tags: - item operationId: get_item summary: Fetch an item parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/item_id" responses: '200': description: An item. content: @@ -6680,11 +6627,10 @@ tags: - item operationId: update_item summary: Update an active item parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/item_id" requestBody: content: application/json: schema: @@ -6847,11 +6793,10 @@ tags: - item operationId: deactivate_item summary: Deactivate an item parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/item_id" description: Deactivating an item makes it unavailable for new purchases. It will not affect existing line items. responses: '200': @@ -6960,11 +6905,10 @@ not found: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected Recurly error: %v\", e)\n\treturn nil, err\n}\nfmt.Printf(\"Item deactivated: %s\", deactivatedItem.Code)" "/items/{item_id}/reactivate": parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/item_id" put: tags: - item operationId: reactivate_item @@ -7091,11 +7035,10 @@ operationId: list_measured_unit summary: List a site's measured units description: See the [Pagination Guide](/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/ids" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/sort_dates" - "$ref": "#/components/parameters/filter_begin_time" @@ -7124,12 +7067,10 @@ post: tags: - measured_unit operationId: create_measured_unit summary: Create a new measured unit - parameters: - - "$ref": "#/components/parameters/site_id" requestBody: content: application/json: schema: "$ref": "#/components/schemas/MeasuredUnitCreate" @@ -7171,11 +7112,10 @@ tags: - measured_unit operationId: get_measured_unit summary: Fetch a measured unit parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/measured_unit_id" responses: '200': description: An item. content: @@ -7199,11 +7139,10 @@ tags: - measured_unit operationId: update_measured_unit summary: Update a measured unit parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/measured_unit_id" requestBody: content: application/json: schema: @@ -7246,11 +7185,10 @@ - measured_unit operationId: remove_measured_unit summary: Remove a measured unit description: A mesured unit cannot be deleted if it is used by an active plan. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/measured_unit_id" responses: '200': description: A measured unit. content: @@ -7277,11 +7215,10 @@ operationId: list_invoices summary: List a site's invoices description: See the [Pagination Guide](/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/ids" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/sort_dates" - "$ref": "#/components/parameters/filter_begin_time" @@ -7380,11 +7317,10 @@ tags: - invoice operationId: get_invoice summary: Fetch an invoice parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/invoice_id" responses: '200': description: An invoice. content: @@ -7496,11 +7432,10 @@ tags: - invoice operationId: update_invoice summary: Update an invoice parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/invoice_id" requestBody: content: application/json: schema: @@ -7648,11 +7583,10 @@ tags: - invoice operationId: get_invoice_pdf summary: Fetch an invoice as a PDF parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/invoice_id" responses: '200': description: An invoice as a PDF. content: @@ -7788,11 +7722,10 @@ operationId: collect_invoice summary: Collect a pending or past due, automatic invoice description: Force a collection attempt using the stored billing information. This will trigger a transaction outside of Recurly's normal retry logic. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/invoice_id" requestBody: content: application/json: schema: @@ -7921,11 +7854,10 @@ description: | Indicates that the invoice was not successfully paid for and that collection attempts should stop. This functionality is mostly used to halt the dunning procedures for an invoice. Only invoices with the `pending`, `processing` or `past_due` states can be marked as failed. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/invoice_id" responses: '200': description: The updated invoice. content: @@ -8048,11 +7980,10 @@ description: | Indicates that the invoice was successfully paid for and that automated collection attempts should stop - this functionality is typically used to indicate that payment was received via another method and that revenue should be recognized. Only invoices with the `pending`, `processing`, `past_due` or `failed` states can be marked as paid. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/invoice_id" responses: '200': description: The updated invoice. content: @@ -8174,11 +8105,10 @@ tags: - invoice operationId: reopen_invoice summary: Reopen a closed, manual invoice parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/invoice_id" responses: '200': description: The updated invoice. content: @@ -8300,11 +8230,10 @@ operationId: void_invoice summary: Void a credit invoice. description: Invoice must be a credit invoice (`type=credit`) and cannot be closed (`state=closed`), processing (`state=processing`), or already voided. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/invoice_id" responses: '200': description: The updated invoice. content: @@ -8408,11 +8337,10 @@ summary: Record an external payment for a manual invoices. description: This endpoint allows you to record an offline payment that was not captured through your gateway. It will throw an error for an auto-collecting invoice. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/invoice_id" requestBody: content: application/json: schema: @@ -8472,11 +8400,10 @@ operationId: list_invoice_line_items summary: List an invoice's line items description: See the [Pagination Guide](/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/invoice_id" - "$ref": "#/components/parameters/ids" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/sort_dates" @@ -8583,11 +8510,10 @@ operationId: list_invoice_coupon_redemptions summary: Show the coupon redemptions applied to an invoice description: See the [Pagination Guide](/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/invoice_id" - "$ref": "#/components/parameters/ids" - "$ref": "#/components/parameters/sort_dates" - "$ref": "#/components/parameters/filter_begin_time" - "$ref": "#/components/parameters/filter_end_time" @@ -8683,11 +8609,10 @@ For a charge invoice the related invoices will be credit invoices. For a credit invoice the related invoices will be charge invoices. See the [Pagination Guide](/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/invoice_id" responses: '200': description: A list of the credit or charge invoices associated with the invoice. @@ -8777,11 +8702,10 @@ * refund a specific amount which is divided across all the line items. * refund quantities of line items. If you want to refund the entire refundable amount on the invoice, the simplest way is to do `type=amount` without specifiying an `amount`. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/invoice_id" requestBody: content: application/json: schema: @@ -8940,11 +8864,10 @@ operationId: list_line_items summary: List a site's line items description: See the [Pagination Guide](/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/ids" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/sort_dates" - "$ref": "#/components/parameters/filter_begin_time" @@ -9047,11 +8970,10 @@ tags: - line_item operationId: get_line_item summary: Fetch a line item parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/line_item_id" responses: '200': description: A line item. content: @@ -9163,11 +9085,10 @@ tags: - line_item operationId: remove_line_item summary: Delete an uninvoiced line item parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/line_item_id" responses: '204': description: Line item deleted. '404': @@ -9284,11 +9205,10 @@ operationId: list_plans summary: List a site's plans description: See the [Pagination Guide](/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/ids" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/sort_dates" - "$ref": "#/components/parameters/filter_begin_time" @@ -9385,12 +9305,10 @@ post: tags: - plan operationId: create_plan summary: Create a plan - parameters: - - "$ref": "#/components/parameters/site_id" requestBody: content: application/json: schema: "$ref": "#/components/schemas/PlanCreate" @@ -9585,11 +9503,10 @@ tags: - plan operationId: get_plan summary: Fetch a plan parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/plan_id" responses: '200': description: A plan. content: @@ -9701,11 +9618,10 @@ tags: - plan operationId: update_plan summary: Update a plan parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/plan_id" requestBody: content: application/json: schema: @@ -9848,11 +9764,10 @@ tags: - plan operationId: remove_plan summary: Remove a plan parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/plan_id" responses: '200': description: Plan deleted content: @@ -9959,11 +9874,10 @@ operationId: list_plan_add_ons summary: List a plan's add-ons description: See the [Pagination Guide](/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/plan_id" - "$ref": "#/components/parameters/ids" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/sort_dates" @@ -10061,11 +9975,10 @@ tags: - add-on operationId: create_plan_add_on summary: Create an add-on parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/plan_id" requestBody: content: application/json: schema: @@ -10259,11 +10172,10 @@ tags: - add-on operationId: get_plan_add_on summary: Fetch a plan's add-on parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/plan_id" - "$ref": "#/components/parameters/add_on_id" responses: '200': description: An add-on. @@ -10378,11 +10290,10 @@ tags: - add-on operationId: update_plan_add_on summary: Update an add-on parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/plan_id" - "$ref": "#/components/parameters/add_on_id" requestBody: content: application/json: @@ -10521,11 +10432,10 @@ tags: - add-on operationId: remove_plan_add_on summary: Remove an add-on parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/plan_id" - "$ref": "#/components/parameters/add_on_id" responses: '200': description: Add-on deleted @@ -10630,11 +10540,10 @@ operationId: list_add_ons summary: List a site's add-ons description: See the [Pagination Guide](/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/ids" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/sort_dates" - "$ref": "#/components/parameters/filter_begin_time" @@ -10731,11 +10640,10 @@ tags: - add-on operationId: get_add_on summary: Fetch an add-on parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/add_on_id" responses: '200': description: An add-on. content: @@ -10850,11 +10758,10 @@ operationId: list_shipping_methods summary: List a site's shipping methods description: See the [Pagination Guide](/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/ids" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/sort_dates" - "$ref": "#/components/parameters/filter_begin_time" @@ -10948,12 +10855,10 @@ post: tags: - shipping_method operationId: create_shipping_method summary: Create a new shipping method - parameters: - - "$ref": "#/components/parameters/site_id" requestBody: content: application/json: schema: "$ref": "#/components/schemas/ShippingMethodCreate" @@ -10995,11 +10900,10 @@ tags: - shipping_method operationId: get_shipping_method summary: Fetch a shipping method parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/shipping_method_id" responses: '200': description: A shipping method. content: @@ -11023,11 +10927,10 @@ tags: - shipping_method operationId: update_shipping_method summary: Update an active Shipping Method parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/shipping_method_id" requestBody: content: application/json: schema: @@ -11069,11 +10972,10 @@ tags: - shipping_method operationId: deactivate_shipping_method summary: Deactivate a shipping method parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/shipping_method_id" description: Deactivating a shipping method makes it unavailable for new subscriptions or purchases. It will not affect existing subscriptions. responses: '200': @@ -11102,11 +11004,10 @@ operationId: list_subscriptions summary: List a site's subscriptions description: See the [Pagination Guide](/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/ids" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/sort_dates" - "$ref": "#/components/parameters/filter_begin_time" @@ -11203,12 +11104,10 @@ post: tags: - subscription operationId: create_subscription summary: Create a new subscription - parameters: - - "$ref": "#/components/parameters/site_id" requestBody: content: application/json: schema: "$ref": "#/components/schemas/SubscriptionCreate" @@ -11383,11 +11282,10 @@ tags: - subscription operationId: get_subscription summary: Fetch a subscription parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/subscription_id" responses: '200': description: A subscription. content: @@ -11504,11 +11402,10 @@ summary: Update a subscription description: This only lets you change the subscription settings that have no impact on the billed amount. Use the [Create Subscription Change](#operation/create_subscription_change) endpoint to make those changes. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/subscription_id" requestBody: content: application/json: schema: @@ -11653,11 +11550,10 @@ description: | Immediately expires the subscription. If the subscription has a paid invoice you may choose to refund all, part or none of last invoice's amount. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/subscription_id" - name: refund in: query description: | The type of refund to perform: @@ -11816,11 +11712,10 @@ cycle. At the end of the current billing cycle the subscription will expire and the customer will no longer be billed. Canceled subscriptions can be reactivated until the end of the billing cycle. When a future subscription (`state=future`) is canceled it becomes failed `state=failed` and cannot be reactivated. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/subscription_id" requestBody: content: application/json: schema: @@ -11953,11 +11848,10 @@ description: | This will bring the subscription back to an active, renewing state on the customer's original billing cycle. Expired or failed subscriptions cannot be reactivated; instead a new subscription plan will need to be applied to the account. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/subscription_id" responses: '200': description: An active subscription. content: @@ -12087,11 +11981,10 @@ subscription is currently paused and `remaining_pause_cycles` is 0, the subscription will be resumed. Expired, cancelled, or failed subscriptions cannot be paused. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/subscription_id" requestBody: content: application/json: schema: @@ -12241,11 +12134,10 @@ active state. The subscription must be in the paused state. Active, expired, cancelled, or failed subscriptions cannot be resumed. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/subscription_id" responses: '200': description: A subscription. content: @@ -12372,11 +12264,10 @@ paid subscription, creating and collecting an invoice for auto-collecting subsriptions. If the invoice cannot be collected, the subscription will remain in trial. The subscription must be in a trial. Active, paused, expired, cancelled, or failed subscriptions cannot be converted. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/subscription_id" responses: '200': description: A subscription. content: @@ -12408,11 +12299,10 @@ tags: - subscription_change operationId: get_subscription_change summary: Fetch a subscription's pending change parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/subscription_id" responses: '200': description: A subscription's pending change. content: @@ -12540,11 +12430,10 @@ - subscription_change operationId: create_subscription_change summary: Create a new subscription change description: Calling this will overwrite an existing, pending subscription change. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/subscription_id" requestBody: content: application/json: schema: @@ -12698,11 +12587,10 @@ tags: - subscription_change operationId: remove_subscription_change summary: Delete the pending subscription change parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/subscription_id" description: Deleting the pending subscription change will cause the current subscription settings to be used on the next renewal. responses: '204': @@ -12815,11 +12703,10 @@ operationId: preview_subscription_change summary: Preview a new subscription change description: Calling this will not save the subscription change or overwrite an existing change. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/subscription_id" requestBody: content: application/json: schema: @@ -12859,11 +12746,10 @@ operationId: list_subscription_invoices summary: List a subscription's invoices description: See the [Pagination Guide](/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/subscription_id" - "$ref": "#/components/parameters/ids" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/sort_dates" @@ -12964,11 +12850,10 @@ operationId: list_subscription_line_items summary: List a subscription's line items description: See the [Pagination Guide](/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/subscription_id" - "$ref": "#/components/parameters/ids" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/sort_dates" @@ -13072,11 +12957,10 @@ operationId: list_subscription_coupon_redemptions summary: Show the coupon redemptions for a subscription description: See the [Pagination Guide](/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/subscription_id" - "$ref": "#/components/parameters/ids" - "$ref": "#/components/parameters/sort_dates" - "$ref": "#/components/parameters/filter_begin_time" - "$ref": "#/components/parameters/filter_end_time" @@ -13168,11 +13052,10 @@ tags: - usage operationId: list_usage summary: List a subscription add-on's usage records parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/subscription_id" - "$ref": "#/components/parameters/add_on_id" - "$ref": "#/components/parameters/ids" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" @@ -13210,11 +13093,10 @@ tags: - usage operationId: create_usage summary: Log a usage record on this subscription add-on parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/subscription_id" - "$ref": "#/components/parameters/add_on_id" requestBody: content: application/json: @@ -13258,11 +13140,10 @@ tags: - usage operationId: get_usage summary: Get a usage record parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/usage_id" responses: '200': description: The usage record. content: @@ -13292,11 +13173,10 @@ tags: - usage operationId: update_usage summary: Update a usage record parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/usage_id" requestBody: content: application/json: schema: @@ -13338,11 +13218,10 @@ tags: - usage operationId: remove_usage summary: Delete a usage record. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/usage_id" responses: '204': description: Usage was successfully deleted. '400': @@ -13377,11 +13256,10 @@ operationId: list_transactions summary: List a site's transactions description: See the [Pagination Guide](/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/ids" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/sort_dates" - "$ref": "#/components/parameters/filter_begin_time" @@ -13481,11 +13359,10 @@ tags: - transaction operationId: get_transaction summary: Fetch a transaction parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/transaction_id" responses: '200': description: A transaction. content: @@ -13593,11 +13470,10 @@ {\n\t\tfmt.Printf(\"Resource not found: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected Recurly error: %v\", e)\n\treturn nil, err\n}\nfmt.Printf(\"Fetched Transaction: %v\", transaction.Id)" "/unique_coupon_codes/{unique_coupon_code_id}": parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/unique_coupon_code_id" get: tags: - unique_coupon_code operationId: get_unique_coupon_code @@ -13655,11 +13531,10 @@ schema: "$ref": "#/components/schemas/Error" x-code-samples: [] "/unique_coupon_codes/{unique_coupon_code_id}/restore": parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/unique_coupon_code_id" put: tags: - unique_coupon_code operationId: reactivate_unique_coupon_code @@ -13697,12 +13572,10 @@ operationId: create_purchase summary: Create a new purchase description: A purchase is a checkout containing at least one or more subscriptions or one-time charges (line items) and supports both coupon and gift card redemptions. All items purchased will be on one invoice and paid for with one transaction. - parameters: - - "$ref": "#/components/parameters/site_id" requestBody: content: application/json: schema: "$ref": "#/components/schemas/PurchaseCreate" @@ -13931,12 +13804,10 @@ operationId: preview_purchase summary: Preview a new purchase description: A purchase is a checkout containing at least one or more subscriptions or one-time charges (line items) and supports both coupon and gift card redemptions. All items purchased will be on one invoice and paid for with one transaction. - parameters: - - "$ref": "#/components/parameters/site_id" requestBody: content: application/json: schema: "$ref": "#/components/schemas/PurchaseCreate" @@ -14154,12 +14025,10 @@ := err.(*recurly.Error); ok {\n\tif e.Type == recurly.ErrorTypeValidation {\n\t\tfmt.Printf(\"Failed validation: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected Recurly error: %v\", e)\n\treturn nil, err\n}\nfmt.Printf(\"Preview Charge Invoice %v\", collection.ChargeInvoice)" "/export_dates": - parameters: - - "$ref": "#/components/parameters/site_id" get: tags: - automated_exports operationId: get_export_dates summary: List the dates that have an available export to download. @@ -14267,11 +14136,10 @@ ok {\n\tfmt.Printf(\"Unexpected Recurly error: %v\", e)\n\treturn nil, err\n}\n\nfor _, date := range exportDates.Dates {\n\tfmt.Println(\"Exports are available for: \", date)\n}" "/export_dates/{export_date}/export_files": parameters: - - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/export_date" get: tags: - automated_exports operationId: get_export_files @@ -19491,16 +19359,26 @@ format: float title: Unit amount minimum: 0 maximum: 1000000 description: Allows up to 2 decimal places. Optionally, override the tiers' - default unit amount. + default unit amount. If add-on's `add_on_type` is `usage` and `usage_type` + is `percentage`, cannot be provided. unit_amount_decimal: type: string title: Unit amount decimal description: | Allows up to 9 decimal places. Optionally, override tiers' default unit amount. If `unit_amount_decimal` is provided, `unit_amount` cannot be provided. + If add-on's `add_on_type` is `usage` and `usage_type` is `percentage`, cannot be provided. + usage_percentage: + type: string + title: Usage Percentage + description: The percentage taken of the monetary amount of usage tracked. + This can be up to 4 decimal places represented as a string. A value between + 0.0 and 100.0. Optionally, override tiers' default usage percentage. Required + if add-on's `add_on_type` is `usage` and `usage_type` is `percentage`. + Must be omitted otherwise. SubscriptionCancel: type: object properties: timeframe: title: Timeframe