Skip to content

Commit e2d2e17

Browse files
Merge pull request #864 from recurly/v3-v2021-02-25-26175519407
Generated Latest Changes for v2021-02-25
2 parents 1015137 + dee23ad commit e2d2e17

8 files changed

Lines changed: 141 additions & 28 deletions

File tree

lib/recurly/resources/address.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function setCountry(string $country): void
7373

7474
/**
7575
* Getter method for the geo_code attribute.
76-
* Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration
76+
* Code that represents a geographic entity (location or object). Only returned when Vertex or Avalara for Communications is enabled.
7777
*
7878
* @return ?string
7979
*/

lib/recurly/resources/address_with_name.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function setFirstName(string $first_name): void
9898

9999
/**
100100
* Getter method for the geo_code attribute.
101-
* Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration
101+
* Code that represents a geographic entity (location or object). Only returned when Vertex or Avalara for Communications is enabled.
102102
*
103103
* @return ?string
104104
*/

lib/recurly/resources/coupon.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ public function setState(string $state): void
587587

588588
/**
589589
* Getter method for the temporal_amount attribute.
590-
* If `duration` is "temporal" than `temporal_amount` is an integer which is multiplied by `temporal_unit` to define the duration that the coupon will be applied to invoices for.
590+
* If `duration` is "temporal" than `temporal_amount` is an integer which is multiplied by `temporal_unit` to define the duration that the coupon will be applied to invoices for. When `temporal_unit` is "billing_period", this is the number of complete billing cycles.
591591
*
592592
* @return ?int
593593
*/
@@ -610,7 +610,7 @@ public function setTemporalAmount(int $temporal_amount): void
610610

611611
/**
612612
* Getter method for the temporal_unit attribute.
613-
* If `duration` is "temporal" than `temporal_unit` is multiplied by `temporal_amount` to define the duration that the coupon will be applied to invoices for.
613+
* If `duration` is "temporal" than `temporal_unit` is multiplied by `temporal_amount` to define the duration that the coupon will be applied to invoices for. Use "billing_period" to apply the coupon for a fixed number of billing cycles. Requires `redemption_resource=subscription`.
614614
*
615615
* @return ?string
616616
*/

lib/recurly/resources/custom_field.php

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
class CustomField extends RecurlyResource
1414
{
1515
private $_name;
16+
private $_source_record_id;
17+
private $_source_record_type;
1618
private $_value;
1719

1820
protected static $array_hints = [
@@ -42,6 +44,52 @@ public function setName(string $name): void
4244
$this->_name = $name;
4345
}
4446

47+
/**
48+
* Getter method for the source_record_id attribute.
49+
* The UUID of the record this custom field was automatically copied from. Only present when the field was copied from another record.
50+
*
51+
* @return ?string
52+
*/
53+
public function getSourceRecordId(): ?string
54+
{
55+
return $this->_source_record_id;
56+
}
57+
58+
/**
59+
* Setter method for the source_record_id attribute.
60+
*
61+
* @param string $source_record_id
62+
*
63+
* @return void
64+
*/
65+
public function setSourceRecordId(string $source_record_id): void
66+
{
67+
$this->_source_record_id = $source_record_id;
68+
}
69+
70+
/**
71+
* Getter method for the source_record_type attribute.
72+
* The type of record this custom field was automatically copied from. Only present when the field was copied from another record.
73+
*
74+
* @return ?string
75+
*/
76+
public function getSourceRecordType(): ?string
77+
{
78+
return $this->_source_record_type;
79+
}
80+
81+
/**
82+
* Setter method for the source_record_type attribute.
83+
*
84+
* @param string $source_record_type
85+
*
86+
* @return void
87+
*/
88+
public function setSourceRecordType(string $source_record_type): void
89+
{
90+
$this->_source_record_type = $source_record_type;
91+
}
92+
4593
/**
4694
* Getter method for the value attribute.
4795
* Any values that resemble a credit card number or security code (CVV/CVC) will be rejected.

lib/recurly/resources/invoice.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class Invoice extends RecurlyResource
2222
private $_created_at;
2323
private $_credit_payments;
2424
private $_currency;
25+
private $_custom_fields;
2526
private $_customer_notes;
2627
private $_discount;
2728
private $_due_at;
@@ -60,6 +61,7 @@ class Invoice extends RecurlyResource
6061

6162
protected static $array_hints = [
6263
'setCreditPayments' => '\Recurly\Resources\CreditPayment',
64+
'setCustomFields' => '\Recurly\Resources\CustomField',
6365
'setLineItems' => '\Recurly\Resources\LineItem',
6466
'setSubscriptionIds' => 'string',
6567
'setTransactions' => '\Recurly\Resources\Transaction',
@@ -296,6 +298,29 @@ public function setCurrency(string $currency): void
296298
$this->_currency = $currency;
297299
}
298300

301+
/**
302+
* Getter method for the custom_fields attribute.
303+
* A list of custom fields that were on the account at the time of invoice creation and were marked to be displayed on invoices. Read-only; cannot be set directly on the invoice.
304+
*
305+
* @return array
306+
*/
307+
public function getCustomFields(): array
308+
{
309+
return $this->_custom_fields ?? [] ;
310+
}
311+
312+
/**
313+
* Setter method for the custom_fields attribute.
314+
*
315+
* @param array $custom_fields
316+
*
317+
* @return void
318+
*/
319+
public function setCustomFields(array $custom_fields): void
320+
{
321+
$this->_custom_fields = $custom_fields;
322+
}
323+
299324
/**
300325
* Getter method for the customer_notes attribute.
301326
* This will default to the Customer Notes text specified on the Invoice Settings. Specify custom notes to add or override Customer Notes.

lib/recurly/resources/invoice_address.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public function setFirstName(string $first_name): void
123123

124124
/**
125125
* Getter method for the geo_code attribute.
126-
* Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration
126+
* Code that represents a geographic entity (location or object). Only returned when Vertex or Avalara for Communications is enabled.
127127
*
128128
* @return ?string
129129
*/

lib/recurly/resources/shipping_address.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ public function setFirstName(string $first_name): void
199199

200200
/**
201201
* Getter method for the geo_code attribute.
202-
* Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration
202+
* Code that represents a geographic entity (location or object). Only returned when Vertex or Avalara for Communications is enabled.
203203
*
204204
* @return ?string
205205
*/

openapi/api.yaml

Lines changed: 62 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -200,14 +200,12 @@ x-tagGroups:
200200
- usage
201201
- automated_exports
202202
- gift_cards
203-
- name: App Management
203+
- name: Invoices and Payments
204204
tags:
205-
- external_subscriptions
206-
- external_invoices
207-
- external_products
208-
- external_accounts
209-
- external_product_references
210-
- external_payment_phases
205+
- invoice
206+
- line_item
207+
- credit_payment
208+
- transaction
211209
- name: Products and Promotions
212210
tags:
213211
- item
@@ -218,12 +216,6 @@ x-tagGroups:
218216
- coupon_redemption
219217
- unique_coupon_code
220218
- price_segment
221-
- name: Invoices and Payments
222-
tags:
223-
- invoice
224-
- line_item
225-
- credit_payment
226-
- transaction
227219
- name: Configuration
228220
tags:
229221
- site
@@ -233,6 +225,14 @@ x-tagGroups:
233225
- business_entities
234226
- general_ledger_account
235227
- performance_obligations
228+
- name: App Management
229+
tags:
230+
- external_subscriptions
231+
- external_invoices
232+
- external_products
233+
- external_accounts
234+
- external_product_references
235+
- external_payment_phases
236236
tags:
237237
- name: site
238238
x-displayName: Site
@@ -9245,7 +9245,6 @@ paths:
92459245
description: Apply credit payment to the outstanding balance on an existing
92469246
charge invoice from an account’s available balance from existing credit invoices.
92479247
parameters:
9248-
- "$ref": "#/components/parameters/site_id"
92499248
- "$ref": "#/components/parameters/invoice_id"
92509249
responses:
92519250
'200':
@@ -18621,7 +18620,7 @@ components:
1862118620
type: string
1862218621
maxLength: 20
1862318622
description: Code that represents a geographic entity (location or object).
18624-
Only returned for Sling Vertex Integration
18623+
Only returned when Vertex or Avalara for Communications is enabled.
1862518624
AddressWithName:
1862618625
allOf:
1862718626
- "$ref": "#/components/schemas/Address"
@@ -19642,12 +19641,14 @@ components:
1964219641
title: Temporal amount
1964319642
description: If `duration` is "temporal" than `temporal_amount` is an integer
1964419643
which is multiplied by `temporal_unit` to define the duration that the
19645-
coupon will be applied to invoices for.
19644+
coupon will be applied to invoices for. When `temporal_unit` is "billing_period",
19645+
this is the number of complete billing cycles.
1964619646
temporal_unit:
1964719647
title: Temporal unit
1964819648
description: If `duration` is "temporal" than `temporal_unit` is multiplied
1964919649
by `temporal_amount` to define the duration that the coupon will be applied
19650-
to invoices for.
19650+
to invoices for. Use "billing_period" to apply the coupon for a fixed
19651+
number of billing cycles. Requires `redemption_resource=subscription`.
1965119652
"$ref": "#/components/schemas/TemporalUnitEnum"
1965219653
free_trial_unit:
1965319654
title: Free trial unit
@@ -19833,12 +19834,14 @@ components:
1983319834
title: Temporal amount
1983419835
description: If `duration` is "temporal" than `temporal_amount` is an
1983519836
integer which is multiplied by `temporal_unit` to define the duration
19836-
that the coupon will be applied to invoices for.
19837+
that the coupon will be applied to invoices for. When `temporal_unit`
19838+
is "billing_period", this is the number of complete billing cycles.
1983719839
temporal_unit:
1983819840
title: Temporal unit
1983919841
description: If `duration` is "temporal" than `temporal_unit` is multiplied
1984019842
by `temporal_amount` to define the duration that the coupon will be
19841-
applied to invoices for.
19843+
applied to invoices for. Use "billing_period" to apply the coupon for
19844+
a fixed number of billing cycles. Requires `redemption_resource=subscription`.
1984219845
"$ref": "#/components/schemas/TemporalUnitEnum"
1984319846
coupon_type:
1984419847
title: Coupon type
@@ -20195,6 +20198,19 @@ components:
2019520198
description: Any values that resemble a credit card number or security code
2019620199
(CVV/CVC) will be rejected.
2019720200
maxLength: 255
20201+
source_record_type:
20202+
type: string
20203+
title: Source record type
20204+
description: The type of record this custom field was automatically copied
20205+
from. Only present when the field was copied from another record.
20206+
readOnly: true
20207+
"$ref": "#/components/schemas/SourceRecordTypeEnum"
20208+
source_record_id:
20209+
type: string
20210+
title: Source record ID
20211+
description: The UUID of the record this custom field was automatically
20212+
copied from. Only present when the field was copied from another record.
20213+
readOnly: true
2019820214
required:
2019920215
- name
2020020216
- value
@@ -20206,6 +20222,15 @@ components:
2020620222
remove a field send the name with a null or empty value.
2020720223
items:
2020820224
"$ref": "#/components/schemas/CustomField"
20225+
InvoiceCustomFields:
20226+
type: array
20227+
title: Custom fields
20228+
description: A list of custom fields that were on the account at the time of
20229+
invoice creation and were marked to be displayed on invoices. Read-only; cannot
20230+
be set directly on the invoice.
20231+
readOnly: true
20232+
items:
20233+
"$ref": "#/components/schemas/CustomField"
2020920234
CustomFieldDefinition:
2021020235
type: object
2021120236
title: Custom field definition
@@ -21084,6 +21109,8 @@ components:
2108421109
title: Business Entity ID
2108521110
description: Unique ID to identify the business entity assigned to the invoice.
2108621111
Available when the `Multiple Business Entities` feature is enabled.
21112+
custom_fields:
21113+
"$ref": "#/components/schemas/InvoiceCustomFields"
2108721114
InvoiceCreate:
2108821115
type: object
2108921116
properties:
@@ -22735,7 +22762,7 @@ components:
2273522762
type: string
2273622763
maxLength: 20
2273722764
description: Code that represents a geographic entity (location or object).
22738-
Only returned for Sling Vertex Integration
22765+
Only returned when Vertex or Avalara for Communications is enabled.
2273922766
created_at:
2274022767
type: string
2274122768
title: Created at
@@ -22823,7 +22850,7 @@ components:
2282322850
type: string
2282422851
maxLength: 20
2282522852
description: Code that represents a geographic entity (location or object).
22826-
Only returned for Sling Vertex Integration
22853+
Only returned when Vertex or Avalara for Communications is enabled.
2282722854
country:
2282822855
type: string
2282922856
maxLength: 50
@@ -23154,7 +23181,7 @@ components:
2315423181
type: string
2315523182
maxLength: 20
2315623183
description: Code that represents a geographic entity (location or object).
23157-
Only returned for Sling Vertex Integration
23184+
Only returned when Vertex or Avalara for Communications is enabled.
2315823185
Site:
2315923186
type: object
2316023187
properties:
@@ -27196,11 +27223,16 @@ components:
2719627223
- temporal
2719727224
TemporalUnitEnum:
2719827225
type: string
27226+
description: The temporal unit for the coupon's duration. Used with temporal_amount
27227+
to define how long the coupon applies. When temporal_unit is billing_period,
27228+
the coupon applies for temporal_amount complete billing cycles rather than
27229+
a fixed calendar duration. billing_period requires redemption_resource=subscription.
2719927230
enum:
2720027231
- day
2720127232
- month
2720227233
- week
2720327234
- year
27235+
- billing_period
2720427236
FreeTrialUnitEnum:
2720527237
type: string
2720627238
enum:
@@ -28104,3 +28136,11 @@ components:
2810428136
enum:
2810528137
- customer
2810628138
- merchant
28139+
SourceRecordTypeEnum:
28140+
type: string
28141+
description: The type of record a custom field was automatically copied from.
28142+
enum:
28143+
- account
28144+
- plan
28145+
- product
28146+
- subscription

0 commit comments

Comments
 (0)