Skip to content

Commit b142130

Browse files
authored
Merge pull request #852 from recurly/v3-v2021-02-25-19578875009
Generated Latest Changes for v2021-02-25
2 parents 46c0ccf + ca5ea8b commit b142130

File tree

4 files changed

+191
-0
lines changed

4 files changed

+191
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?php
2+
/**
3+
* This file is automatically created by Recurly's OpenAPI generation process
4+
* and thus any edits you make by hand will be lost. If you wish to make a
5+
* change to this file, please create a Github issue explaining the changes you
6+
* need and we will usher them to the appropriate places.
7+
*/
8+
namespace Recurly\Resources;
9+
10+
use Recurly\RecurlyResource;
11+
12+
// phpcs:disable
13+
class CreditApplicationPolicy extends RecurlyResource
14+
{
15+
private $_mode;
16+
17+
protected static $array_hints = [
18+
];
19+
20+
21+
/**
22+
* Getter method for the mode attribute.
23+
* Determines which credit invoices are applied to invoices:
24+
- `all`: All available credit invoices are applied (default)
25+
- `none`: No credit invoices are applied automatically
26+
27+
*
28+
* @return ?string
29+
*/
30+
public function getMode(): ?string
31+
{
32+
return $this->_mode;
33+
}
34+
35+
/**
36+
* Setter method for the mode attribute.
37+
*
38+
* @param string $mode
39+
*
40+
* @return void
41+
*/
42+
public function setMode(string $mode): void
43+
{
44+
$this->_mode = $mode;
45+
}
46+
}

lib/recurly/resources/reference_only_currency_conversion.php

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
class ReferenceOnlyCurrencyConversion extends RecurlyResource
1414
{
1515
private $_currency;
16+
private $_date;
17+
private $_rate;
18+
private $_source;
1619
private $_subtotal_in_cents;
1720
private $_tax_in_cents;
1821

@@ -43,6 +46,75 @@ public function setCurrency(string $currency): void
4346
$this->_currency = $currency;
4447
}
4548

49+
/**
50+
* Getter method for the date attribute.
51+
* The date of the conversion rate.
52+
*
53+
* @return ?string
54+
*/
55+
public function getDate(): ?string
56+
{
57+
return $this->_date;
58+
}
59+
60+
/**
61+
* Setter method for the date attribute.
62+
*
63+
* @param string $date
64+
*
65+
* @return void
66+
*/
67+
public function setDate(string $date): void
68+
{
69+
$this->_date = $date;
70+
}
71+
72+
/**
73+
* Getter method for the rate attribute.
74+
* The conversion rate to the currency.
75+
*
76+
* @return ?string
77+
*/
78+
public function getRate(): ?string
79+
{
80+
return $this->_rate;
81+
}
82+
83+
/**
84+
* Setter method for the rate attribute.
85+
*
86+
* @param string $rate
87+
*
88+
* @return void
89+
*/
90+
public function setRate(string $rate): void
91+
{
92+
$this->_rate = $rate;
93+
}
94+
95+
/**
96+
* Getter method for the source attribute.
97+
* The source of the conversion rate.
98+
*
99+
* @return ?string
100+
*/
101+
public function getSource(): ?string
102+
{
103+
return $this->_source;
104+
}
105+
106+
/**
107+
* Setter method for the source attribute.
108+
*
109+
* @param string $source
110+
*
111+
* @return void
112+
*/
113+
public function setSource(string $source): void
114+
{
115+
$this->_source = $source;
116+
}
117+
46118
/**
47119
* Getter method for the subtotal_in_cents attribute.
48120
* The subtotal converted to the currency.

lib/recurly/resources/subscription.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class Subscription extends RecurlyResource
2727
private $_converted_at;
2828
private $_coupon_redemptions;
2929
private $_created_at;
30+
private $_credit_application_policy;
3031
private $_currency;
3132
private $_current_period_ends_at;
3233
private $_current_period_started_at;
@@ -421,6 +422,31 @@ public function setCreatedAt(string $created_at): void
421422
$this->_created_at = $created_at;
422423
}
423424

425+
/**
426+
* Getter method for the credit_application_policy attribute.
427+
* Controls whether credit invoices are automatically applied to new invoices.
428+
The `mode` field determines the application behavior.
429+
430+
*
431+
* @return ?\Recurly\Resources\CreditApplicationPolicy
432+
*/
433+
public function getCreditApplicationPolicy(): ?\Recurly\Resources\CreditApplicationPolicy
434+
{
435+
return $this->_credit_application_policy;
436+
}
437+
438+
/**
439+
* Setter method for the credit_application_policy attribute.
440+
*
441+
* @param \Recurly\Resources\CreditApplicationPolicy $credit_application_policy
442+
*
443+
* @return void
444+
*/
445+
public function setCreditApplicationPolicy(\Recurly\Resources\CreditApplicationPolicy $credit_application_policy): void
446+
{
447+
$this->_credit_application_policy = $credit_application_policy;
448+
}
449+
424450
/**
425451
* Getter method for the currency attribute.
426452
* 3-letter ISO 4217 currency code.

openapi/api.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20911,6 +20911,8 @@ components:
2091120911
default: 0
2091220912
net_terms_type:
2091320913
"$ref": "#/components/schemas/NetTermsTypeEnum"
20914+
credit_application_policy:
20915+
"$ref": "#/components/schemas/CreditApplicationPolicy"
2091420916
po_number:
2091520917
type: string
2091620918
title: Purchase order number
@@ -22507,6 +22509,19 @@ components:
2250722509
format: float
2250822510
title: Tax In Cents
2250922511
description: The tax converted to the currency.
22512+
rate:
22513+
type: string
22514+
title: Rate
22515+
description: The conversion rate to the currency.
22516+
source:
22517+
type: string
22518+
title: Source
22519+
description: The source of the conversion rate.
22520+
date:
22521+
type: string
22522+
title: Date
22523+
format: date
22524+
description: The date of the conversion rate.
2251022525
ShippingAddressCreate:
2251122526
type: object
2251222527
properties:
@@ -23125,6 +23140,8 @@ components:
2312523140
default: 0
2312623141
net_terms_type:
2312723142
"$ref": "#/components/schemas/NetTermsTypeEnum"
23143+
credit_application_policy:
23144+
"$ref": "#/components/schemas/CreditApplicationPolicy"
2312823145
terms_and_conditions:
2312923146
type: string
2313023147
title: Terms and conditions
@@ -23976,6 +23993,8 @@ components:
2397623993
default: 0
2397723994
net_terms_type:
2397823995
"$ref": "#/components/schemas/NetTermsTypeEnum"
23996+
credit_application_policy:
23997+
"$ref": "#/components/schemas/CreditApplicationPolicy"
2397923998
gateway_code:
2398023999
type: string
2398124000
title: Gateway Code
@@ -24107,6 +24126,8 @@ components:
2410724126
description: The new set of ramp intervals for the subscription.
2410824127
items:
2410924128
"$ref": "#/components/schemas/SubscriptionRampInterval"
24129+
credit_application_policy:
24130+
"$ref": "#/components/schemas/CreditApplicationPolicy"
2411024131
bulk:
2411124132
type: boolean
2411224133
description: Optional field to be used only when needing to bypass the 60
@@ -24195,6 +24216,8 @@ components:
2419524216
default: 0
2419624217
net_terms_type:
2419724218
"$ref": "#/components/schemas/NetTermsTypeEnum"
24219+
credit_application_policy:
24220+
"$ref": "#/components/schemas/CreditApplicationPolicy"
2419824221
gateway_code:
2419924222
type: string
2420024223
title: Gateway Code
@@ -25033,6 +25056,8 @@ components:
2503325056
default: 0
2503425057
net_terms_type:
2503525058
"$ref": "#/components/schemas/NetTermsTypeEnum"
25059+
credit_application_policy_override:
25060+
"$ref": "#/components/schemas/CreditApplicationPolicy"
2503625061
terms_and_conditions:
2503725062
type: string
2503825063
title: Terms and conditions
@@ -27038,6 +27063,28 @@ components:
2703827063
enum:
2703927064
- automatic
2704027065
- manual
27066+
CreditApplicationPolicy:
27067+
type: object
27068+
title: Credit Application Policy
27069+
description: |
27070+
Controls whether credit invoices are automatically applied to new invoices.
27071+
The `mode` field determines the application behavior.
27072+
properties:
27073+
mode:
27074+
"$ref": "#/components/schemas/CreditApplicationModeEnum"
27075+
required:
27076+
- mode
27077+
CreditApplicationModeEnum:
27078+
type: string
27079+
title: Credit Application Mode
27080+
description: |
27081+
Determines which credit invoices are applied to invoices:
27082+
- `all`: All available credit invoices are applied (default)
27083+
- `none`: No credit invoices are applied automatically
27084+
enum:
27085+
- all
27086+
- none
27087+
default: all
2704127088
InvoiceRefundTypeEnum:
2704227089
type: string
2704327090
enum:

0 commit comments

Comments
 (0)