recurly 4.75.0 → 4.77.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/.github/workflows/ci.yml +1 -1
- data/.github/workflows/docs.yml +2 -2
- data/CHANGELOG.md +23 -0
- data/GETTING_STARTED.md +1 -1
- data/lib/recurly/client/operations.rb +14 -1
- data/lib/recurly/requests/address.rb +1 -1
- data/lib/recurly/requests/coupon_create.rb +3 -3
- data/lib/recurly/requests/custom_field.rb +8 -0
- data/lib/recurly/requests/invoice_address.rb +1 -1
- data/lib/recurly/requests/recovery_account_create.rb +34 -0
- data/lib/recurly/requests/recovery_address.rb +38 -0
- data/lib/recurly/requests/recovery_billing_info_create.rb +54 -0
- data/lib/recurly/requests/recovery_invoice_create.rb +34 -0
- data/lib/recurly/requests/recovery_line_item_create.rb +38 -0
- data/lib/recurly/requests/recovery_transaction_create.rb +22 -0
- data/lib/recurly/requests/shipping_address_create.rb +1 -1
- data/lib/recurly/requests/shipping_address_update.rb +1 -1
- data/lib/recurly/resources/address.rb +1 -1
- data/lib/recurly/resources/address_with_name.rb +1 -1
- data/lib/recurly/resources/coupon.rb +2 -2
- data/lib/recurly/resources/coupon_discount_trial.rb +1 -1
- data/lib/recurly/resources/coupon_redemption.rb +4 -0
- data/lib/recurly/resources/coupon_redemption_mini.rb +5 -1
- data/lib/recurly/resources/coupon_redemption_remaining_duration.rb +18 -0
- data/lib/recurly/resources/custom_field.rb +8 -0
- data/lib/recurly/resources/invoice.rb +8 -0
- data/lib/recurly/resources/invoice_address.rb +1 -1
- data/lib/recurly/resources/line_item.rb +5 -1
- data/lib/recurly/resources/line_item_discount.rb +34 -0
- data/lib/recurly/resources/shipping_address.rb +1 -1
- data/lib/recurly/version.rb +1 -1
- data/openapi/api.yaml +439 -26
- metadata +11 -3
data/openapi/api.yaml
CHANGED
|
@@ -200,14 +200,13 @@ x-tagGroups:
|
|
|
200
200
|
- usage
|
|
201
201
|
- automated_exports
|
|
202
202
|
- gift_cards
|
|
203
|
-
- name:
|
|
203
|
+
- name: Invoices and Payments
|
|
204
204
|
tags:
|
|
205
|
-
-
|
|
206
|
-
-
|
|
207
|
-
-
|
|
208
|
-
-
|
|
209
|
-
-
|
|
210
|
-
- external_payment_phases
|
|
205
|
+
- invoice
|
|
206
|
+
- line_item
|
|
207
|
+
- credit_payment
|
|
208
|
+
- transaction
|
|
209
|
+
- revenue_recovery
|
|
211
210
|
- name: Products and Promotions
|
|
212
211
|
tags:
|
|
213
212
|
- item
|
|
@@ -218,12 +217,6 @@ x-tagGroups:
|
|
|
218
217
|
- coupon_redemption
|
|
219
218
|
- unique_coupon_code
|
|
220
219
|
- price_segment
|
|
221
|
-
- name: Invoices and Payments
|
|
222
|
-
tags:
|
|
223
|
-
- invoice
|
|
224
|
-
- line_item
|
|
225
|
-
- credit_payment
|
|
226
|
-
- transaction
|
|
227
220
|
- name: Configuration
|
|
228
221
|
tags:
|
|
229
222
|
- site
|
|
@@ -233,6 +226,14 @@ x-tagGroups:
|
|
|
233
226
|
- business_entities
|
|
234
227
|
- general_ledger_account
|
|
235
228
|
- performance_obligations
|
|
229
|
+
- name: App Management
|
|
230
|
+
tags:
|
|
231
|
+
- external_subscriptions
|
|
232
|
+
- external_invoices
|
|
233
|
+
- external_products
|
|
234
|
+
- external_accounts
|
|
235
|
+
- external_product_references
|
|
236
|
+
- external_payment_phases
|
|
236
237
|
tags:
|
|
237
238
|
- name: site
|
|
238
239
|
x-displayName: Site
|
|
@@ -310,6 +311,9 @@ tags:
|
|
|
310
311
|
subscription is created or renewed or a charge is created on the account, Recurly
|
|
311
312
|
will sum the charges, discount or tax as appropriate, and send the invoice out
|
|
312
313
|
for collection.
|
|
314
|
+
- name: revenue_recovery
|
|
315
|
+
x-displayName: Revenue Recovery
|
|
316
|
+
description: Revenue recovery
|
|
313
317
|
- name: line_item
|
|
314
318
|
x-displayName: Line Item
|
|
315
319
|
description: Line items are the charges and credits on your customer's invoices.
|
|
@@ -9245,7 +9249,6 @@ paths:
|
|
|
9245
9249
|
description: Apply credit payment to the outstanding balance on an existing
|
|
9246
9250
|
charge invoice from an account’s available balance from existing credit invoices.
|
|
9247
9251
|
parameters:
|
|
9248
|
-
- "$ref": "#/components/parameters/site_id"
|
|
9249
9252
|
- "$ref": "#/components/parameters/invoice_id"
|
|
9250
9253
|
responses:
|
|
9251
9254
|
'200':
|
|
@@ -10506,6 +10509,51 @@ paths:
|
|
|
10506
10509
|
{\n\t\tfmt.Printf(\"Failed validation: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected
|
|
10507
10510
|
Recurly error: %v\", e)\n\treturn nil, err\n}\n\nfmt.Printf(\"Refunded Invoice:
|
|
10508
10511
|
%v\", invoice)"
|
|
10512
|
+
"/invoices/recovery":
|
|
10513
|
+
post:
|
|
10514
|
+
tags:
|
|
10515
|
+
- revenue_recovery
|
|
10516
|
+
operationId: create_invoice_retry
|
|
10517
|
+
summary: Create an invoice for revenue recovery
|
|
10518
|
+
requestBody:
|
|
10519
|
+
content:
|
|
10520
|
+
application/json:
|
|
10521
|
+
schema:
|
|
10522
|
+
"$ref": "#/components/schemas/RecoveryInvoiceCreate"
|
|
10523
|
+
required: true
|
|
10524
|
+
responses:
|
|
10525
|
+
'201':
|
|
10526
|
+
description: Returns the new invoices.
|
|
10527
|
+
content:
|
|
10528
|
+
application/json:
|
|
10529
|
+
schema:
|
|
10530
|
+
"$ref": "#/components/schemas/InvoiceCollection"
|
|
10531
|
+
'400':
|
|
10532
|
+
description: Bad request, perhaps invalid JSON?
|
|
10533
|
+
content:
|
|
10534
|
+
application/json:
|
|
10535
|
+
schema:
|
|
10536
|
+
"$ref": "#/components/schemas/Error"
|
|
10537
|
+
'404':
|
|
10538
|
+
description: Incorrect site ID.
|
|
10539
|
+
content:
|
|
10540
|
+
application/json:
|
|
10541
|
+
schema:
|
|
10542
|
+
"$ref": "#/components/schemas/Error"
|
|
10543
|
+
'422':
|
|
10544
|
+
description: Invalid parameters, no pending line items, or error running
|
|
10545
|
+
the transaction.
|
|
10546
|
+
content:
|
|
10547
|
+
application/json:
|
|
10548
|
+
schema:
|
|
10549
|
+
"$ref": "#/components/schemas/ErrorMayHaveTransaction"
|
|
10550
|
+
default:
|
|
10551
|
+
description: Unexpected error.
|
|
10552
|
+
content:
|
|
10553
|
+
application/json:
|
|
10554
|
+
schema:
|
|
10555
|
+
"$ref": "#/components/schemas/Error"
|
|
10556
|
+
x-code-samples: []
|
|
10509
10557
|
"/line_items":
|
|
10510
10558
|
get:
|
|
10511
10559
|
tags:
|
|
@@ -18621,7 +18669,252 @@ components:
|
|
|
18621
18669
|
type: string
|
|
18622
18670
|
maxLength: 20
|
|
18623
18671
|
description: Code that represents a geographic entity (location or object).
|
|
18624
|
-
Only returned for
|
|
18672
|
+
Only returned when Vertex or Avalara for Communications is enabled.
|
|
18673
|
+
RecoveryAddress:
|
|
18674
|
+
type: object
|
|
18675
|
+
properties:
|
|
18676
|
+
phone:
|
|
18677
|
+
type: string
|
|
18678
|
+
title: Phone number
|
|
18679
|
+
street1:
|
|
18680
|
+
type: string
|
|
18681
|
+
title: Street 1
|
|
18682
|
+
maxLength: 50
|
|
18683
|
+
street2:
|
|
18684
|
+
type: string
|
|
18685
|
+
title: Street 2
|
|
18686
|
+
maxLength: 50
|
|
18687
|
+
city:
|
|
18688
|
+
type: string
|
|
18689
|
+
title: City
|
|
18690
|
+
region:
|
|
18691
|
+
type: string
|
|
18692
|
+
title: State/Province
|
|
18693
|
+
description: State or province.
|
|
18694
|
+
postal_code:
|
|
18695
|
+
type: string
|
|
18696
|
+
title: Zip/Postal code
|
|
18697
|
+
description: Zip or postal code.
|
|
18698
|
+
country:
|
|
18699
|
+
type: string
|
|
18700
|
+
title: Country
|
|
18701
|
+
description: Country, 2-letter ISO 3166-1 alpha-2 code.
|
|
18702
|
+
RecoveryInvoiceCreate:
|
|
18703
|
+
type: object
|
|
18704
|
+
properties:
|
|
18705
|
+
currency:
|
|
18706
|
+
type: string
|
|
18707
|
+
title: Currency
|
|
18708
|
+
description: 3-letter ISO 4217 currency code.
|
|
18709
|
+
maxLength: 3
|
|
18710
|
+
due_at:
|
|
18711
|
+
type: string
|
|
18712
|
+
format: date-time
|
|
18713
|
+
title: Due at
|
|
18714
|
+
description: Date invoice was originally due. Must be in the past.
|
|
18715
|
+
po_number:
|
|
18716
|
+
type: string
|
|
18717
|
+
title: Purchase order number
|
|
18718
|
+
description: This identifies the PO number associated with the subscription.
|
|
18719
|
+
maxLength: 50
|
|
18720
|
+
external_recovery_eligible:
|
|
18721
|
+
type: boolean
|
|
18722
|
+
title: External recovery eligible
|
|
18723
|
+
description: Must be set to `true` to acknowledge that the invoice is eligible
|
|
18724
|
+
for external recovery. Requests with `false`, omitted, or non-boolean
|
|
18725
|
+
values will be rejected.
|
|
18726
|
+
account:
|
|
18727
|
+
"$ref": "#/components/schemas/RecoveryAccountCreate"
|
|
18728
|
+
line_items:
|
|
18729
|
+
type: array
|
|
18730
|
+
title: Line items
|
|
18731
|
+
description: Line items to include on the invoice. Currency is specified
|
|
18732
|
+
at the root level and must not be included in individual line items.
|
|
18733
|
+
items:
|
|
18734
|
+
"$ref": "#/components/schemas/RecoveryLineItemCreate"
|
|
18735
|
+
required:
|
|
18736
|
+
- currency
|
|
18737
|
+
- due_at
|
|
18738
|
+
- external_recovery_eligible
|
|
18739
|
+
- account
|
|
18740
|
+
- line_items
|
|
18741
|
+
RecoveryBillingInfoCreate:
|
|
18742
|
+
type: object
|
|
18743
|
+
title: Recovery billing info
|
|
18744
|
+
properties:
|
|
18745
|
+
first_name:
|
|
18746
|
+
type: string
|
|
18747
|
+
title: First name
|
|
18748
|
+
maxLength: 50
|
|
18749
|
+
last_name:
|
|
18750
|
+
type: string
|
|
18751
|
+
title: Last name
|
|
18752
|
+
maxLength: 50
|
|
18753
|
+
company:
|
|
18754
|
+
type: string
|
|
18755
|
+
title: Company name
|
|
18756
|
+
maxLength: 100
|
|
18757
|
+
address:
|
|
18758
|
+
"$ref": "#/components/schemas/RecoveryAddress"
|
|
18759
|
+
ip_address:
|
|
18760
|
+
type: string
|
|
18761
|
+
title: IP address
|
|
18762
|
+
description: "*STRONGLY RECOMMENDED* Customer's IP address when updating
|
|
18763
|
+
their billing information."
|
|
18764
|
+
maxLength: 20
|
|
18765
|
+
gateway_code:
|
|
18766
|
+
type: string
|
|
18767
|
+
title: An identifier for a specific payment gateway.
|
|
18768
|
+
maxLength: 12
|
|
18769
|
+
primary_payment_method:
|
|
18770
|
+
type: boolean
|
|
18771
|
+
title: Primary Payment Method
|
|
18772
|
+
description: The `primary_payment_method` field is used to designate the
|
|
18773
|
+
primary billing info on the account. An account can have a maximum of
|
|
18774
|
+
1 primary. If a user sets a different payment method as a primary, then
|
|
18775
|
+
the existing primary will no longer be marked as such.
|
|
18776
|
+
backup_payment_method:
|
|
18777
|
+
type: boolean
|
|
18778
|
+
description: The `backup_payment_method` field is used to designate a billing
|
|
18779
|
+
info as a backup on the account that will be tried if the initial billing
|
|
18780
|
+
info used for an invoice is declined. All payment methods, including the
|
|
18781
|
+
billing info marked `primary_payment_method` can be set as a backup. An
|
|
18782
|
+
account can have a maximum of 1 backup, if a user sets a different payment
|
|
18783
|
+
method as a backup, the existing backup will no longer be marked as such.
|
|
18784
|
+
payment_gateway_references:
|
|
18785
|
+
type: array
|
|
18786
|
+
description: Array of Payment Gateway References, each a reference to a
|
|
18787
|
+
third-party gateway object of varying types.
|
|
18788
|
+
items:
|
|
18789
|
+
"$ref": "#/components/schemas/PaymentGatewayReferences"
|
|
18790
|
+
network_transaction_id:
|
|
18791
|
+
type: string
|
|
18792
|
+
title: Network Transaction ID
|
|
18793
|
+
description: |
|
|
18794
|
+
Network transaction ID from the previous customer-in-session subscription signup or billing info storage.
|
|
18795
|
+
|
|
18796
|
+
- 10-15 alphanumeric characters for Mastercard
|
|
18797
|
+
- 14-15 alphanumeric for Visa
|
|
18798
|
+
- 15 digits for all other brands
|
|
18799
|
+
- 16 alphanumeric characters for Cartes Bancaires, which are processed as Visa or Mastercard
|
|
18800
|
+
maxLength: 16
|
|
18801
|
+
transactions:
|
|
18802
|
+
type: array
|
|
18803
|
+
title: Transactions
|
|
18804
|
+
description: Transactions from previous collection attempts for this payment
|
|
18805
|
+
method.
|
|
18806
|
+
items:
|
|
18807
|
+
"$ref": "#/components/schemas/RecoveryTransactionCreate"
|
|
18808
|
+
required:
|
|
18809
|
+
- gateway_code
|
|
18810
|
+
- payment_gateway_references
|
|
18811
|
+
- transactions
|
|
18812
|
+
RecoveryAccountCreate:
|
|
18813
|
+
type: object
|
|
18814
|
+
properties:
|
|
18815
|
+
address:
|
|
18816
|
+
"$ref": "#/components/schemas/RecoveryAddress"
|
|
18817
|
+
billing_infos:
|
|
18818
|
+
type: array
|
|
18819
|
+
title: Billing Infos
|
|
18820
|
+
description: If the premium Wallet feature is enabled, more than one payment
|
|
18821
|
+
method can be associated with an account, and one can be designated as
|
|
18822
|
+
a primary and one as a backup. Without the Wallet feature, only one payment
|
|
18823
|
+
method will be accepted.
|
|
18824
|
+
items:
|
|
18825
|
+
"$ref": "#/components/schemas/RecoveryBillingInfoCreate"
|
|
18826
|
+
code:
|
|
18827
|
+
type: string
|
|
18828
|
+
description: The unique identifier of the account. This cannot be changed
|
|
18829
|
+
once the account is created.
|
|
18830
|
+
maxLength: 50
|
|
18831
|
+
email:
|
|
18832
|
+
type: string
|
|
18833
|
+
format: email
|
|
18834
|
+
description: The email address used for communicating with this customer.
|
|
18835
|
+
maxLength: 255
|
|
18836
|
+
custom_fields:
|
|
18837
|
+
"$ref": "#/components/schemas/CustomFields"
|
|
18838
|
+
dunning_campaign_id:
|
|
18839
|
+
type: string
|
|
18840
|
+
title: Dunning Campaign ID
|
|
18841
|
+
description: Unique ID to identify a dunning campaign. Used to specify if
|
|
18842
|
+
a non-default dunning campaign should be assigned to this account. For
|
|
18843
|
+
sites without multiple dunning campaigns enabled, the default dunning
|
|
18844
|
+
campaign will always be used.
|
|
18845
|
+
required:
|
|
18846
|
+
- code
|
|
18847
|
+
- billing_infos
|
|
18848
|
+
RecoveryLineItemCreate:
|
|
18849
|
+
required:
|
|
18850
|
+
- unit_amount
|
|
18851
|
+
type: object
|
|
18852
|
+
title: Recovery line item
|
|
18853
|
+
properties:
|
|
18854
|
+
tax:
|
|
18855
|
+
type: number
|
|
18856
|
+
format: float
|
|
18857
|
+
title: Tax
|
|
18858
|
+
description: The tax amount for the line item.
|
|
18859
|
+
custom_fields:
|
|
18860
|
+
"$ref": "#/components/schemas/CustomFields"
|
|
18861
|
+
harmonized_system_code:
|
|
18862
|
+
type: string
|
|
18863
|
+
title: Harmonized System Code
|
|
18864
|
+
description: The Harmonized System (HS) code is an internationally standardized
|
|
18865
|
+
system of names and numbers to classify traded products. The HS code,
|
|
18866
|
+
sometimes called Commodity Code, is used by customs authorities around
|
|
18867
|
+
the world to identify products when assessing duties and taxes. The HS
|
|
18868
|
+
code may also be referred to as the tariff code or customs code. Values
|
|
18869
|
+
should contain only digits and decimals.
|
|
18870
|
+
maxLength: 25
|
|
18871
|
+
pattern: "^\\d+(\\.\\d+)*$"
|
|
18872
|
+
product_code:
|
|
18873
|
+
type: string
|
|
18874
|
+
title: Product code
|
|
18875
|
+
description: Optional field to track a product code or SKU for the line
|
|
18876
|
+
item. This can be used to later reporting on product purchases.
|
|
18877
|
+
maxLength: 50
|
|
18878
|
+
quantity:
|
|
18879
|
+
type: integer
|
|
18880
|
+
title: Quantity
|
|
18881
|
+
description: This number will be multiplied by the unit amount to compute
|
|
18882
|
+
the subtotal before any discounts or taxes.
|
|
18883
|
+
default: 1
|
|
18884
|
+
description:
|
|
18885
|
+
type: string
|
|
18886
|
+
title: Description
|
|
18887
|
+
description: Description that appears on the invoice.
|
|
18888
|
+
maxLength: 255
|
|
18889
|
+
unit_amount:
|
|
18890
|
+
type: number
|
|
18891
|
+
format: float
|
|
18892
|
+
title: Unit amount
|
|
18893
|
+
description: A positive or negative amount will result in a positive `unit_amount`.
|
|
18894
|
+
RecoveryTransactionCreate:
|
|
18895
|
+
required:
|
|
18896
|
+
- gateway_error_code
|
|
18897
|
+
- attempted_collection_date
|
|
18898
|
+
type: object
|
|
18899
|
+
properties:
|
|
18900
|
+
gateway_error_code:
|
|
18901
|
+
type: string
|
|
18902
|
+
title: Gateway error code
|
|
18903
|
+
description: The error code returned by the payment gateway for the original
|
|
18904
|
+
payment collection attempt.
|
|
18905
|
+
maxLength: 50
|
|
18906
|
+
merchant_advice_code:
|
|
18907
|
+
type: string
|
|
18908
|
+
title: Merchant advice code
|
|
18909
|
+
description: The advice code returned by the payment gateway for the original
|
|
18910
|
+
payment collection attempt. This field is only applicable for certain
|
|
18911
|
+
gateways.
|
|
18912
|
+
maxLength: 2
|
|
18913
|
+
attempted_collection_date:
|
|
18914
|
+
type: string
|
|
18915
|
+
format: date-time
|
|
18916
|
+
title: Attempted collection date
|
|
18917
|
+
description: The date the original payment collection was attempted.
|
|
18625
18918
|
AddressWithName:
|
|
18626
18919
|
allOf:
|
|
18627
18920
|
- "$ref": "#/components/schemas/Address"
|
|
@@ -19580,6 +19873,44 @@ components:
|
|
|
19580
19873
|
token_id:
|
|
19581
19874
|
type: string
|
|
19582
19875
|
description: A token [generated by Recurly.js](https://recurly.com/developers/reference/recurly-js/#getting-a-token).
|
|
19876
|
+
LineItemDiscount:
|
|
19877
|
+
type: object
|
|
19878
|
+
title: Line item discount
|
|
19879
|
+
description: A discount applied to a line item charge by a coupon redemption.
|
|
19880
|
+
properties:
|
|
19881
|
+
object:
|
|
19882
|
+
type: string
|
|
19883
|
+
title: Object type
|
|
19884
|
+
description: Will always be `line_item_discount`.
|
|
19885
|
+
readOnly: true
|
|
19886
|
+
coupon_id:
|
|
19887
|
+
type: string
|
|
19888
|
+
title: Coupon ID
|
|
19889
|
+
description: The ID of the coupon that generated this discount.
|
|
19890
|
+
readOnly: true
|
|
19891
|
+
coupon_redemption_id:
|
|
19892
|
+
type: string
|
|
19893
|
+
title: Coupon Redemption ID
|
|
19894
|
+
description: The ID of the coupon redemption that generated this discount.
|
|
19895
|
+
readOnly: true
|
|
19896
|
+
order_applied:
|
|
19897
|
+
type: integer
|
|
19898
|
+
title: Order applied
|
|
19899
|
+
description: The order in which this discount was applied when multiple
|
|
19900
|
+
coupons were redeemed.
|
|
19901
|
+
readOnly: true
|
|
19902
|
+
discount_amount:
|
|
19903
|
+
type: number
|
|
19904
|
+
format: float
|
|
19905
|
+
title: Discount amount
|
|
19906
|
+
description: The amount discounted on this line item by this coupon redemption.
|
|
19907
|
+
readOnly: true
|
|
19908
|
+
currency:
|
|
19909
|
+
type: string
|
|
19910
|
+
title: Currency
|
|
19911
|
+
description: 3-letter ISO 4217 currency code.
|
|
19912
|
+
maxLength: 3
|
|
19913
|
+
readOnly: true
|
|
19583
19914
|
Coupon:
|
|
19584
19915
|
type: object
|
|
19585
19916
|
properties:
|
|
@@ -19642,12 +19973,14 @@ components:
|
|
|
19642
19973
|
title: Temporal amount
|
|
19643
19974
|
description: If `duration` is "temporal" than `temporal_amount` is an integer
|
|
19644
19975
|
which is multiplied by `temporal_unit` to define the duration that the
|
|
19645
|
-
coupon will be applied to invoices for.
|
|
19976
|
+
coupon will be applied to invoices for. When `temporal_unit` is "billing_period",
|
|
19977
|
+
this is the number of complete billing cycles.
|
|
19646
19978
|
temporal_unit:
|
|
19647
19979
|
title: Temporal unit
|
|
19648
19980
|
description: If `duration` is "temporal" than `temporal_unit` is multiplied
|
|
19649
19981
|
by `temporal_amount` to define the duration that the coupon will be applied
|
|
19650
|
-
to invoices for.
|
|
19982
|
+
to invoices for. Use "billing_period" to apply the coupon for a fixed
|
|
19983
|
+
number of billing cycles. Requires `redemption_resource=subscription`.
|
|
19651
19984
|
"$ref": "#/components/schemas/TemporalUnitEnum"
|
|
19652
19985
|
free_trial_unit:
|
|
19653
19986
|
title: Free trial unit
|
|
@@ -19763,7 +20096,8 @@ components:
|
|
|
19763
20096
|
title: Free trial unit
|
|
19764
20097
|
description: Description of the unit of time the coupon is for. Used with
|
|
19765
20098
|
`free_trial_amount` to determine the duration of time the coupon is
|
|
19766
|
-
for.
|
|
20099
|
+
for. Required if `discount_type` is `free_trial`. Use `billing_period`
|
|
20100
|
+
to grant a free trial for a number of billing cycles.
|
|
19767
20101
|
"$ref": "#/components/schemas/FreeTrialUnitEnum"
|
|
19768
20102
|
free_trial_amount:
|
|
19769
20103
|
type: integer
|
|
@@ -19833,12 +20167,16 @@ components:
|
|
|
19833
20167
|
title: Temporal amount
|
|
19834
20168
|
description: If `duration` is "temporal" than `temporal_amount` is an
|
|
19835
20169
|
integer which is multiplied by `temporal_unit` to define the duration
|
|
19836
|
-
that the coupon will be applied to invoices for.
|
|
20170
|
+
that the coupon will be applied to invoices for. When `temporal_unit`
|
|
20171
|
+
is "billing_period", this is the number of complete billing cycles.
|
|
19837
20172
|
temporal_unit:
|
|
19838
20173
|
title: Temporal unit
|
|
19839
20174
|
description: If `duration` is "temporal" than `temporal_unit` is multiplied
|
|
19840
20175
|
by `temporal_amount` to define the duration that the coupon will be
|
|
19841
|
-
applied to invoices for.
|
|
20176
|
+
applied to invoices for. Use "billing_period" to apply the coupon for
|
|
20177
|
+
a fixed number of billing cycles. Requires `redemption_resource=subscription`.
|
|
20178
|
+
Not compatible with `discount_type=free_trial`; use `free_trial_unit=billing_period`
|
|
20179
|
+
and `free_trial_amount` instead.
|
|
19842
20180
|
"$ref": "#/components/schemas/TemporalUnitEnum"
|
|
19843
20181
|
coupon_type:
|
|
19844
20182
|
title: Coupon type
|
|
@@ -19900,7 +20238,8 @@ components:
|
|
|
19900
20238
|
properties:
|
|
19901
20239
|
unit:
|
|
19902
20240
|
title: Trial unit
|
|
19903
|
-
description: Temporal unit of the free trial
|
|
20241
|
+
description: Temporal unit of the free trial. When `billing_period`,
|
|
20242
|
+
`length` represents the number of billing cycles.
|
|
19904
20243
|
"$ref": "#/components/schemas/FreeTrialUnitEnum"
|
|
19905
20244
|
length:
|
|
19906
20245
|
type: integer
|
|
@@ -20013,6 +20352,9 @@ components:
|
|
|
20013
20352
|
title: Coupon Redemption state
|
|
20014
20353
|
default: active
|
|
20015
20354
|
"$ref": "#/components/schemas/ActiveStateEnum"
|
|
20355
|
+
remaining_duration:
|
|
20356
|
+
readOnly: true
|
|
20357
|
+
"$ref": "#/components/schemas/CouponRedemptionRemainingDuration"
|
|
20016
20358
|
currency:
|
|
20017
20359
|
type: string
|
|
20018
20360
|
title: Currency
|
|
@@ -20040,6 +20382,23 @@ components:
|
|
|
20040
20382
|
description: The date and time the redemption was removed from the account
|
|
20041
20383
|
(un-redeemed).
|
|
20042
20384
|
format: date-time
|
|
20385
|
+
CouponRedemptionRemainingDuration:
|
|
20386
|
+
type: object
|
|
20387
|
+
properties:
|
|
20388
|
+
type:
|
|
20389
|
+
type: string
|
|
20390
|
+
title: Duration Type
|
|
20391
|
+
description: The coupon's duration type. `temporal` includes an `expires_at`
|
|
20392
|
+
timestamp. `forever` and `single_use` have no additional fields.
|
|
20393
|
+
"$ref": "#/components/schemas/CouponDurationEnum"
|
|
20394
|
+
readOnly: true
|
|
20395
|
+
expires_at:
|
|
20396
|
+
type: string
|
|
20397
|
+
title: Expires at
|
|
20398
|
+
format: date-time
|
|
20399
|
+
description: Present when `type` is `temporal`. The datetime after which
|
|
20400
|
+
this redemption will no longer apply.
|
|
20401
|
+
readOnly: true
|
|
20043
20402
|
CouponRedemptionCreate:
|
|
20044
20403
|
type: object
|
|
20045
20404
|
properties:
|
|
@@ -20071,8 +20430,11 @@ components:
|
|
|
20071
20430
|
coupon:
|
|
20072
20431
|
"$ref": "#/components/schemas/CouponMini"
|
|
20073
20432
|
state:
|
|
20074
|
-
title:
|
|
20433
|
+
title: Coupon Redemption state
|
|
20075
20434
|
"$ref": "#/components/schemas/ActiveStateEnum"
|
|
20435
|
+
remaining_duration:
|
|
20436
|
+
readOnly: true
|
|
20437
|
+
"$ref": "#/components/schemas/CouponRedemptionRemainingDuration"
|
|
20076
20438
|
discounted:
|
|
20077
20439
|
type: number
|
|
20078
20440
|
format: float
|
|
@@ -20195,6 +20557,19 @@ components:
|
|
|
20195
20557
|
description: Any values that resemble a credit card number or security code
|
|
20196
20558
|
(CVV/CVC) will be rejected.
|
|
20197
20559
|
maxLength: 255
|
|
20560
|
+
source_record_type:
|
|
20561
|
+
type: string
|
|
20562
|
+
title: Source record type
|
|
20563
|
+
description: The type of record this custom field was automatically copied
|
|
20564
|
+
from. Only present when the field was copied from another record.
|
|
20565
|
+
readOnly: true
|
|
20566
|
+
"$ref": "#/components/schemas/SourceRecordTypeEnum"
|
|
20567
|
+
source_record_id:
|
|
20568
|
+
type: string
|
|
20569
|
+
title: Source record ID
|
|
20570
|
+
description: The UUID of the record this custom field was automatically
|
|
20571
|
+
copied from. Only present when the field was copied from another record.
|
|
20572
|
+
readOnly: true
|
|
20198
20573
|
required:
|
|
20199
20574
|
- name
|
|
20200
20575
|
- value
|
|
@@ -20206,6 +20581,15 @@ components:
|
|
|
20206
20581
|
remove a field send the name with a null or empty value.
|
|
20207
20582
|
items:
|
|
20208
20583
|
"$ref": "#/components/schemas/CustomField"
|
|
20584
|
+
InvoiceCustomFields:
|
|
20585
|
+
type: array
|
|
20586
|
+
title: Custom fields
|
|
20587
|
+
description: A list of custom fields that were on the account at the time of
|
|
20588
|
+
invoice creation and were marked to be displayed on invoices. Read-only; cannot
|
|
20589
|
+
be set directly on the invoice.
|
|
20590
|
+
readOnly: true
|
|
20591
|
+
items:
|
|
20592
|
+
"$ref": "#/components/schemas/CustomField"
|
|
20209
20593
|
CustomFieldDefinition:
|
|
20210
20594
|
type: object
|
|
20211
20595
|
title: Custom field definition
|
|
@@ -20947,6 +21331,12 @@ components:
|
|
|
20947
21331
|
format: float
|
|
20948
21332
|
title: Discount
|
|
20949
21333
|
description: Total discounts applied to this invoice.
|
|
21334
|
+
coupon_redemptions:
|
|
21335
|
+
type: array
|
|
21336
|
+
title: Coupon Redemptions
|
|
21337
|
+
description: The coupon redemptions applied to this invoice.
|
|
21338
|
+
items:
|
|
21339
|
+
"$ref": "#/components/schemas/CouponRedemptionMini"
|
|
20950
21340
|
subtotal:
|
|
20951
21341
|
type: number
|
|
20952
21342
|
format: float
|
|
@@ -21084,6 +21474,8 @@ components:
|
|
|
21084
21474
|
title: Business Entity ID
|
|
21085
21475
|
description: Unique ID to identify the business entity assigned to the invoice.
|
|
21086
21476
|
Available when the `Multiple Business Entities` feature is enabled.
|
|
21477
|
+
custom_fields:
|
|
21478
|
+
"$ref": "#/components/schemas/InvoiceCustomFields"
|
|
21087
21479
|
InvoiceCreate:
|
|
21088
21480
|
type: object
|
|
21089
21481
|
properties:
|
|
@@ -21657,7 +22049,14 @@ components:
|
|
|
21657
22049
|
type: number
|
|
21658
22050
|
format: float
|
|
21659
22051
|
title: Discount
|
|
21660
|
-
description: The
|
|
22052
|
+
description: The sum of all discounts applied to the line item.
|
|
22053
|
+
discounts:
|
|
22054
|
+
type: array
|
|
22055
|
+
title: Discounts
|
|
22056
|
+
description: The breakdown of discounts applied to the line item by coupon
|
|
22057
|
+
redemption.
|
|
22058
|
+
items:
|
|
22059
|
+
"$ref": "#/components/schemas/LineItemDiscount"
|
|
21661
22060
|
liability_gl_account_code:
|
|
21662
22061
|
type: string
|
|
21663
22062
|
title: Accounting code for the ledger account.
|
|
@@ -22735,7 +23134,7 @@ components:
|
|
|
22735
23134
|
type: string
|
|
22736
23135
|
maxLength: 20
|
|
22737
23136
|
description: Code that represents a geographic entity (location or object).
|
|
22738
|
-
Only returned for
|
|
23137
|
+
Only returned when Vertex or Avalara for Communications is enabled.
|
|
22739
23138
|
created_at:
|
|
22740
23139
|
type: string
|
|
22741
23140
|
title: Created at
|
|
@@ -22823,7 +23222,7 @@ components:
|
|
|
22823
23222
|
type: string
|
|
22824
23223
|
maxLength: 20
|
|
22825
23224
|
description: Code that represents a geographic entity (location or object).
|
|
22826
|
-
Only returned for
|
|
23225
|
+
Only returned when Vertex or Avalara for Communications is enabled.
|
|
22827
23226
|
country:
|
|
22828
23227
|
type: string
|
|
22829
23228
|
maxLength: 50
|
|
@@ -23154,7 +23553,7 @@ components:
|
|
|
23154
23553
|
type: string
|
|
23155
23554
|
maxLength: 20
|
|
23156
23555
|
description: Code that represents a geographic entity (location or object).
|
|
23157
|
-
Only returned for
|
|
23556
|
+
Only returned when Vertex or Avalara for Communications is enabled.
|
|
23158
23557
|
Site:
|
|
23159
23558
|
type: object
|
|
23160
23559
|
properties:
|
|
@@ -27196,17 +27595,23 @@ components:
|
|
|
27196
27595
|
- temporal
|
|
27197
27596
|
TemporalUnitEnum:
|
|
27198
27597
|
type: string
|
|
27598
|
+
description: The temporal unit for the coupon's duration. Used with temporal_amount
|
|
27599
|
+
to define how long the coupon applies. When temporal_unit is billing_period,
|
|
27600
|
+
the coupon applies for temporal_amount complete billing cycles rather than
|
|
27601
|
+
a fixed calendar duration. billing_period requires redemption_resource=subscription.
|
|
27199
27602
|
enum:
|
|
27200
27603
|
- day
|
|
27201
27604
|
- month
|
|
27202
27605
|
- week
|
|
27203
27606
|
- year
|
|
27607
|
+
- billing_period
|
|
27204
27608
|
FreeTrialUnitEnum:
|
|
27205
27609
|
type: string
|
|
27206
27610
|
enum:
|
|
27207
27611
|
- day
|
|
27208
27612
|
- month
|
|
27209
27613
|
- week
|
|
27614
|
+
- billing_period
|
|
27210
27615
|
RedemptionResourceEnum:
|
|
27211
27616
|
type: string
|
|
27212
27617
|
enum:
|
|
@@ -28104,3 +28509,11 @@ components:
|
|
|
28104
28509
|
enum:
|
|
28105
28510
|
- customer
|
|
28106
28511
|
- merchant
|
|
28512
|
+
SourceRecordTypeEnum:
|
|
28513
|
+
type: string
|
|
28514
|
+
description: The type of record a custom field was automatically copied from.
|
|
28515
|
+
enum:
|
|
28516
|
+
- account
|
|
28517
|
+
- plan
|
|
28518
|
+
- product
|
|
28519
|
+
- subscription
|