Skip to content

Commit 5667af9

Browse files
Merge pull request #702 from recurly/v3-v2021-02-25-10461538063
Generated Latest Changes for v2021-02-25 (Line Item Refunds)
2 parents d3ab628 + 89191a5 commit 5667af9

File tree

2 files changed

+114
-69
lines changed

2 files changed

+114
-69
lines changed

openapi/api.yaml

Lines changed: 110 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -18148,11 +18148,14 @@ components:
1814818148
minimum: 0
1814918149
tax_code:
1815018150
type: string
18151-
title: Tax code
18152-
description: Used by Avalara, Vertex, and Recurly’s EU VAT tax feature.
18153-
The tax code values are specific to each tax system. If you are using
18154-
Recurly’s EU VAT feature you can use `unknown`, `physical`, or `digital`.
1815518151
maxLength: 50
18152+
title: Tax code
18153+
description: Optional field used by Avalara, Vertex, and Recurly's In-the-Box
18154+
tax solution to determine taxation rules. You can pass in specific tax
18155+
codes using any of these tax integrations. For Recurly's In-the-Box tax
18156+
offering you can also choose to instead use simple values of `unknown`,
18157+
`physical`, or `digital` tax codes. If `item_code`/`item_id` is part of
18158+
the request then `tax_code` must be absent.
1815618159
display_quantity:
1815718160
type: boolean
1815818161
title: Display quantity?
@@ -18367,14 +18370,14 @@ components:
1836718370
minimum: 0
1836818371
tax_code:
1836918372
type: string
18370-
title: Tax code
18371-
description: Optional field used by Avalara, Vertex, and Recurly's EU VAT
18372-
tax feature to determine taxation rules. If you have your own AvaTax or
18373-
Vertex account configured, use their tax codes to assign specific tax
18374-
rules. If you are using Recurly's EU VAT feature, you can use values of
18375-
`unknown`, `physical`, or `digital`. If `item_code`/`item_id` is part
18376-
of the request then `tax_code` must be absent.
1837718373
maxLength: 50
18374+
title: Tax code
18375+
description: Optional field used by Avalara, Vertex, and Recurly's In-the-Box
18376+
tax solution to determine taxation rules. You can pass in specific tax
18377+
codes using any of these tax integrations. For Recurly's In-the-Box tax
18378+
offering you can also choose to instead use simple values of `unknown`,
18379+
`physical`, or `digital` tax codes. If `item_code`/`item_id` is part of
18380+
the request then `tax_code` must be absent.
1837818381
currencies:
1837918382
type: array
1838018383
title: Add-on pricing
@@ -18522,14 +18525,14 @@ components:
1852218525
minimum: 0
1852318526
tax_code:
1852418527
type: string
18525-
title: Tax code
18526-
description: Optional field used by Avalara, Vertex, and Recurly's EU VAT
18527-
tax feature to determine taxation rules. If you have your own AvaTax or
18528-
Vertex account configured, use their tax codes to assign specific tax
18529-
rules. If you are using Recurly's EU VAT feature, you can use values of
18530-
`unknown`, `physical`, or `digital`. If an `Item` is associated to the
18531-
`AddOn` then `tax code` must be absent.
1853218528
maxLength: 50
18529+
title: Tax code
18530+
description: Optional field used by Avalara, Vertex, and Recurly's In-the-Box
18531+
tax solution to determine taxation rules. You can pass in specific tax
18532+
codes using any of these tax integrations. For Recurly's In-the-Box tax
18533+
offering you can also choose to instead use simple values of `unknown`,
18534+
`physical`, or `digital` tax codes. If an `Item` is associated to the
18535+
`AddOn` then `tax_code` must be absent.
1853318536
display_quantity:
1853418537
type: boolean
1853518538
title: Display quantity?
@@ -19808,11 +19811,13 @@ components:
1980819811
minimum: 0
1980919812
tax_code:
1981019813
type: string
19811-
title: Tax code
19812-
description: Used by Avalara, Vertex, and Recurly’s EU VAT tax feature.
19813-
The tax code values are specific to each tax system. If you are using
19814-
Recurly’s EU VAT feature you can use `unknown`, `physical`, or `digital`.
1981519814
maxLength: 50
19815+
title: Tax code
19816+
description: Optional field used by Avalara, Vertex, and Recurly's In-the-Box
19817+
tax solution to determine taxation rules. You can pass in specific tax
19818+
codes using any of these tax integrations. For Recurly's In-the-Box tax
19819+
offering you can also choose to instead use simple values of `unknown`,
19820+
`physical`, or `digital` tax codes.
1981619821
tax_exempt:
1981719822
type: boolean
1981819823
title: Tax exempt?
@@ -19916,11 +19921,13 @@ components:
1991619921
minimum: 0
1991719922
tax_code:
1991819923
type: string
19919-
title: Tax code
19920-
description: Used by Avalara, Vertex, and Recurly’s EU VAT tax feature.
19921-
The tax code values are specific to each tax system. If you are using
19922-
Recurly’s EU VAT feature you can use `unknown`, `physical`, or `digital`.
1992319924
maxLength: 50
19925+
title: Tax code
19926+
description: Optional field used by Avalara, Vertex, and Recurly's In-the-Box
19927+
tax solution to determine taxation rules. You can pass in specific tax
19928+
codes using any of these tax integrations. For Recurly's In-the-Box tax
19929+
offering you can also choose to instead use simple values of `unknown`,
19930+
`physical`, or `digital` tax codes.
1992419931
tax_exempt:
1992519932
type: boolean
1992619933
title: Tax exempt?
@@ -20012,11 +20019,13 @@ components:
2001220019
minimum: 0
2001320020
tax_code:
2001420021
type: string
20015-
title: Tax code
20016-
description: Used by Avalara, Vertex, and Recurly’s EU VAT tax feature.
20017-
The tax code values are specific to each tax system. If you are using
20018-
Recurly’s EU VAT feature you can use `unknown`, `physical`, or `digital`.
2001920022
maxLength: 50
20023+
title: Tax code
20024+
description: Optional field used by Avalara, Vertex, and Recurly's In-the-Box
20025+
tax solution to determine taxation rules. You can pass in specific tax
20026+
codes using any of these tax integrations. For Recurly's In-the-Box tax
20027+
offering you can also choose to instead use simple values of `unknown`,
20028+
`physical`, or `digital` tax codes.
2002020029
tax_exempt:
2002120030
type: boolean
2002220031
title: Tax exempt?
@@ -20466,7 +20475,16 @@ components:
2046620475
title: Amount
2046720476
description: |
2046820477
The amount to be refunded. The amount will be split between the line items.
20469-
If no amount is specified, it will default to refunding the total refundable amount on the invoice.
20478+
If `type` is "amount" and no amount is specified, it will default to refunding the total refundable amount on the invoice. Can only be present if `type` is "amount".
20479+
percentage:
20480+
type: integer
20481+
title: Percentage
20482+
description: The percentage of the remaining balance to be refunded. The
20483+
percentage will be split between the line items. If `type` is "percentage"
20484+
and no percentage is specified, it will default to refunding 100% of the
20485+
refundable amount on the invoice. Can only be present if `type` is "percentage".
20486+
minimum: 1
20487+
maximum: 100
2047020488
line_items:
2047120489
type: array
2047220490
title: Line items
@@ -20482,7 +20500,7 @@ components:
2048220500
- `all_credit` – Issues credit to the account for the entire amount of the refund. Only available when the Credit Invoices feature is enabled.
2048320501
- `all_transaction` – Refunds the entire amount back to transactions, using transactions from previous invoices if necessary. Only available when the Credit Invoices feature is enabled.
2048420502
default: credit_first
20485-
"$ref": "#/components/schemas/RefuneMethodEnum"
20503+
"$ref": "#/components/schemas/RefundMethodEnum"
2048620504
credit_customer_notes:
2048720505
type: string
2048820506
title: Credit customer notes
@@ -20873,11 +20891,13 @@ components:
2087320891
minimum: 0
2087420892
tax_code:
2087520893
type: string
20876-
title: Tax code
20877-
description: Used by Avalara, Vertex, and Recurly’s EU VAT tax feature.
20878-
The tax code values are specific to each tax system. If you are using
20879-
Recurly’s EU VAT feature you can use `unknown`, `physical`, or `digital`.
2088020894
maxLength: 50
20895+
title: Tax code
20896+
description: Optional field used by Avalara, Vertex, and Recurly's In-the-Box
20897+
tax solution to determine taxation rules. You can pass in specific tax
20898+
codes using any of these tax integrations. For Recurly's In-the-Box tax
20899+
offering you can also choose to instead use simple values of `unknown`,
20900+
`physical`, or `digital` tax codes.
2088120901
tax_info:
2088220902
"$ref": "#/components/schemas/TaxInfo"
2088320903
origin_tax_address_source:
@@ -20951,15 +20971,35 @@ components:
2095120971
quantity:
2095220972
type: integer
2095320973
title: Quantity
20954-
description: Line item quantity to be refunded.
20974+
description: Line item quantity to be refunded. Must be less than or equal
20975+
to the `quantity_remaining`. If `quantity_decimal`, `amount`, and `percentage`
20976+
are not present, `quantity` is required. If `amount` or `percentage` is
20977+
present, `quantity` must be absent.
2095520978
quantity_decimal:
2095620979
type: string
2095720980
title: Quantity Decimal
20958-
description: A floating-point alternative to Quantity. If this value is
20959-
present, it will be used in place of Quantity for calculations, and Quantity
20960-
will be the rounded integer value of this number. This field supports
20961-
up to 9 decimal places. The Decimal Quantity feature must be enabled to
20962-
utilize this field.
20981+
description: Decimal quantity to refund. The `quantity_decimal` will be
20982+
used to refund charges that has a NOT null quantity decimal. Must be less
20983+
than or equal to the `quantity_decimal_remaining`. If `quantity`, `amount`,
20984+
and `percentage` are not present, `quantity_decimal` is required. If `amount`
20985+
or `percentage` is present, `quantity_decimal` must be absent. The Decimal
20986+
Quantity feature must be enabled to utilize this field.
20987+
amount:
20988+
type: number
20989+
format: float
20990+
description: The specific amount to be refunded from the adjustment. Must
20991+
be less than or equal to the adjustment's remaining balance. If `quantity`,
20992+
`quantity_decimal` and `percentage` are not present, `amount` is required.
20993+
If `quantity`, `quantity_decimal`, or `percentage` is present, `amount`
20994+
must be absent.
20995+
percentage:
20996+
type: integer
20997+
description: The percentage of the adjustment's remaining balance to refund.
20998+
If `quantity`, `quantity_decimal` and `amount_in_cents` are not present,
20999+
`percentage` is required. If `quantity`, `quantity_decimal` or `amount_in_cents`
21000+
is present, `percentage` must be absent.
21001+
minimum: 1
21002+
maximum: 100
2096321003
prorate:
2096421004
type: boolean
2096521005
title: Prorate
@@ -21095,13 +21135,13 @@ components:
2109521135
minimum: 0
2109621136
tax_code:
2109721137
type: string
21098-
title: Tax code
21099-
description: Optional field used by Avalara, Vertex, and Recurly's EU VAT
21100-
tax feature to determine taxation rules. If you have your own AvaTax or
21101-
Vertex account configured, use their tax codes to assign specific tax
21102-
rules. If you are using Recurly's EU VAT feature, you can use values of
21103-
`unknown`, `physical`, or `digital`.
2110421138
maxLength: 50
21139+
title: Tax code
21140+
description: Optional field used by Avalara, Vertex, and Recurly's In-the-Box
21141+
tax solution to determine taxation rules. You can pass in specific tax
21142+
codes using any of these tax integrations. For Recurly's In-the-Box tax
21143+
offering you can also choose to instead use simple values of `unknown`,
21144+
`physical`, or `digital` tax codes.
2110521145
product_code:
2110621146
type: string
2110721147
title: Product code
@@ -21299,11 +21339,13 @@ components:
2129921339
minimum: 0
2130021340
tax_code:
2130121341
type: string
21302-
title: Tax code
21303-
description: Used by Avalara, Vertex, and Recurly’s EU VAT tax feature.
21304-
The tax code values are specific to each tax system. If you are using
21305-
Recurly’s EU VAT feature you can use `unknown`, `physical`, or `digital`.
2130621342
maxLength: 50
21343+
title: Tax code
21344+
description: Optional field used by Avalara, Vertex, and Recurly's In-the-Box
21345+
tax solution to determine taxation rules. You can pass in specific tax
21346+
codes using any of these tax integrations. For Recurly's In-the-Box tax
21347+
offering you can also choose to instead use simple values of `unknown`,
21348+
`physical`, or `digital` tax codes.
2130721349
tax_exempt:
2130821350
type: boolean
2130921351
title: Tax exempt?
@@ -21512,13 +21554,13 @@ components:
2151221554
minimum: 0
2151321555
tax_code:
2151421556
type: string
21515-
title: Tax code
21516-
description: Optional field used by Avalara, Vertex, and Recurly's EU VAT
21517-
tax feature to determine taxation rules. If you have your own AvaTax or
21518-
Vertex account configured, use their tax codes to assign specific tax
21519-
rules. If you are using Recurly's EU VAT feature, you can use values of
21520-
`unknown`, `physical`, or `digital`.
2152121557
maxLength: 50
21558+
title: Tax code
21559+
description: Optional field used by Avalara, Vertex, and Recurly's In-the-Box
21560+
tax solution to determine taxation rules. You can pass in specific tax
21561+
codes using any of these tax integrations. For Recurly's In-the-Box tax
21562+
offering you can also choose to instead use simple values of `unknown`,
21563+
`physical`, or `digital` tax codes.
2152221564
tax_exempt:
2152321565
type: boolean
2152421566
title: Tax exempt?
@@ -21776,13 +21818,13 @@ components:
2177621818
minimum: 0
2177721819
tax_code:
2177821820
type: string
21779-
title: Tax code
21780-
description: Optional field used by Avalara, Vertex, and Recurly's EU VAT
21781-
tax feature to determine taxation rules. If you have your own AvaTax or
21782-
Vertex account configured, use their tax codes to assign specific tax
21783-
rules. If you are using Recurly's EU VAT feature, you can use values of
21784-
`unknown`, `physical`, or `digital`.
2178521821
maxLength: 50
21822+
title: Tax code
21823+
description: Optional field used by Avalara, Vertex, and Recurly's In-the-Box
21824+
tax solution to determine taxation rules. You can pass in specific tax
21825+
codes using any of these tax integrations. For Recurly's In-the-Box tax
21826+
offering you can also choose to instead use simple values of `unknown`,
21827+
`physical`, or `digital` tax codes.
2178621828
tax_exempt:
2178721829
type: boolean
2178821830
title: Tax exempt?
@@ -26231,8 +26273,9 @@ components:
2623126273
type: string
2623226274
enum:
2623326275
- amount
26276+
- percentage
2623426277
- line_items
26235-
RefuneMethodEnum:
26278+
RefundMethodEnum:
2623626279
type: string
2623726280
enum:
2623826281
- all_credit
@@ -26246,6 +26289,7 @@ components:
2624626289
- ach
2624726290
- amazon
2624826291
- apple_pay
26292+
- braintree_apple_pay
2624926293
- check
2625026294
- credit_card
2625126295
- eft
@@ -26439,6 +26483,7 @@ components:
2643926483
- amazon_billing_agreement
2644026484
- apple_pay
2644126485
- bank_account_info
26486+
- braintree_apple_pay
2644226487
- check
2644326488
- credit_card
2644426489
- eft

recurly/resources.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1841,7 +1841,7 @@ class LineItem(Resource):
18411841
tax : float
18421842
The tax amount for the line item.
18431843
tax_code : str
1844-
Used by Avalara, Vertex, and Recurly’s EU VAT tax feature. The tax code values are specific to each tax system. If you are using Recurly’s EU VAT feature you can use `unknown`, `physical`, or `digital`.
1844+
Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine taxation rules. You can pass in specific tax codes using any of these tax integrations. For Recurly's In-the-Box tax offering you can also choose to instead use simple values of `unknown`, `physical`, or `digital` tax codes.
18451845
tax_exempt : bool
18461846
`true` exempts tax on charges, `false` applies tax on charges. If not defined, then defaults to the Plan and Site settings. This attribute does not work for credits (negative line items). Credits are always applied post-tax. Pre-tax discounts should use the Coupons feature.
18471847
tax_inclusive : bool
@@ -2759,7 +2759,7 @@ class Item(Resource):
27592759
state : str
27602760
The current state of the item.
27612761
tax_code : str
2762-
Used by Avalara, Vertex, and Recurly’s EU VAT tax feature. The tax code values are specific to each tax system. If you are using Recurly’s EU VAT feature you can use `unknown`, `physical`, or `digital`.
2762+
Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine taxation rules. You can pass in specific tax codes using any of these tax integrations. For Recurly's In-the-Box tax offering you can also choose to instead use simple values of `unknown`, `physical`, or `digital` tax codes.
27632763
tax_exempt : bool
27642764
`true` exempts tax on the item, `false` applies tax on the item.
27652765
updated_at : datetime
@@ -2968,7 +2968,7 @@ class Plan(Resource):
29682968
state : str
29692969
The current state of the plan.
29702970
tax_code : str
2971-
Used by Avalara, Vertex, and Recurly’s EU VAT tax feature. The tax code values are specific to each tax system. If you are using Recurly’s EU VAT feature you can use `unknown`, `physical`, or `digital`.
2971+
Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine taxation rules. You can pass in specific tax codes using any of these tax integrations. For Recurly's In-the-Box tax offering you can also choose to instead use simple values of `unknown`, `physical`, or `digital` tax codes.
29722972
tax_exempt : bool
29732973
`true` exempts tax on the plan, `false` applies tax on the plan.
29742974
total_billing_cycles : int
@@ -3153,7 +3153,7 @@ class AddOn(Resource):
31533153
state : str
31543154
Add-ons can be either active or inactive.
31553155
tax_code : str
3156-
Used by Avalara, Vertex, and Recurly’s EU VAT tax feature. The tax code values are specific to each tax system. If you are using Recurly’s EU VAT feature you can use `unknown`, `physical`, or `digital`.
3156+
Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine taxation rules. You can pass in specific tax codes using any of these tax integrations. For Recurly's In-the-Box tax offering you can also choose to instead use simple values of `unknown`, `physical`, or `digital` tax codes. If `item_code`/`item_id` is part of the request then `tax_code` must be absent.
31573157
tier_type : str
31583158
The pricing model for the add-on. For more information,
31593159
[click here](https://docs.recurly.com/docs/billing-models#section-quantity-based). See our

0 commit comments

Comments
 (0)