Skip to content

Commit 52a8e01

Browse files
author
Recurly Integrations
authored
Generated Latest Changes for v2019-10-10
1 parent 65d0ecf commit 52a8e01

File tree

7 files changed

+357
-86
lines changed

7 files changed

+357
-86
lines changed

lib/recurly/client.php

Lines changed: 61 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,21 @@ public function verifyBillingInfo(string $account_id, array $body = []): \Recurl
295295
return $this->makeRequest('POST', $path, $body, null);
296296
}
297297

298+
/**
299+
* Verify an account's credit card billing cvv
300+
*
301+
* @param string $account_id Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`.
302+
* @param array $body The body of the request.
303+
*
304+
* @return \Recurly\Resources\Transaction Transaction information from verify.
305+
* @link https://developers.recurly.com/api/v2019-10-10#operation/verify_billing_info_cvv
306+
*/
307+
public function verifyBillingInfoCvv(string $account_id, array $body): \Recurly\Resources\Transaction
308+
{
309+
$path = $this->interpolatePath("/accounts/{account_id}/billing_info/verify_cvv", ['account_id' => $account_id]);
310+
return $this->makeRequest('POST', $path, $body, null);
311+
}
312+
298313
/**
299314
* Get the list of billing information associated with an account
300315
*
@@ -392,6 +407,38 @@ public function removeABillingInfo(string $account_id, string $billing_info_id):
392407
return $this->makeRequest('DELETE', $path, null, null);
393408
}
394409

410+
/**
411+
* Verify a billing information's credit card
412+
*
413+
* @param string $account_id Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`.
414+
* @param string $billing_info_id Billing Info ID. Can ONLY be used for sites utilizing the Wallet feature.
415+
* @param array $body The body of the request.
416+
*
417+
* @return \Recurly\Resources\Transaction Transaction information from verify.
418+
* @link https://developers.recurly.com/api/v2019-10-10#operation/verify_billing_infos
419+
*/
420+
public function verifyBillingInfos(string $account_id, string $billing_info_id, array $body = []): \Recurly\Resources\Transaction
421+
{
422+
$path = $this->interpolatePath("/accounts/{account_id}/billing_infos/{billing_info_id}/verify", ['account_id' => $account_id, 'billing_info_id' => $billing_info_id]);
423+
return $this->makeRequest('POST', $path, $body, null);
424+
}
425+
426+
/**
427+
* Verify a billing information's credit card cvv
428+
*
429+
* @param string $account_id Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`.
430+
* @param string $billing_info_id Billing Info ID. Can ONLY be used for sites utilizing the Wallet feature.
431+
* @param array $body The body of the request.
432+
*
433+
* @return \Recurly\Resources\Transaction Transaction information from verify.
434+
* @link https://developers.recurly.com/api/v2019-10-10#operation/verify_billing_infos_cvv
435+
*/
436+
public function verifyBillingInfosCvv(string $account_id, string $billing_info_id, array $body): \Recurly\Resources\Transaction
437+
{
438+
$path = $this->interpolatePath("/accounts/{account_id}/billing_infos/{billing_info_id}/verify_cvv", ['account_id' => $account_id, 'billing_info_id' => $billing_info_id]);
439+
return $this->makeRequest('POST', $path, $body, null);
440+
}
441+
395442
/**
396443
* List the coupon redemptions for an account
397444
*
@@ -1423,7 +1470,7 @@ public function listInvoices(array $options = []): \Recurly\Pager
14231470
/**
14241471
* Fetch an invoice
14251472
*
1426-
* @param string $invoice_id Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
1473+
* @param string $invoice_id Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. For number with prefix or country code, use `number-` and `prefix`, e.g. `number-TEST-FR1001`
14271474
*
14281475
* @return \Recurly\Resources\Invoice An invoice.
14291476
* @link https://developers.recurly.com/api/v2019-10-10#operation/get_invoice
@@ -1437,7 +1484,7 @@ public function getInvoice(string $invoice_id): \Recurly\Resources\Invoice
14371484
/**
14381485
* Update an invoice
14391486
*
1440-
* @param string $invoice_id Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
1487+
* @param string $invoice_id Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. For number with prefix or country code, use `number-` and `prefix`, e.g. `number-TEST-FR1001`
14411488
* @param array $body The body of the request.
14421489
*
14431490
* @return \Recurly\Resources\Invoice An invoice.
@@ -1452,7 +1499,7 @@ public function putInvoice(string $invoice_id, array $body): \Recurly\Resources\
14521499
/**
14531500
* Fetch an invoice as a PDF
14541501
*
1455-
* @param string $invoice_id Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
1502+
* @param string $invoice_id Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. For number with prefix or country code, use `number-` and `prefix`, e.g. `number-TEST-FR1001`
14561503
*
14571504
* @return \Recurly\Resources\BinaryFile An invoice as a PDF.
14581505
* @link https://developers.recurly.com/api/v2019-10-10#operation/get_invoice_pdf
@@ -1466,7 +1513,7 @@ public function getInvoicePdf(string $invoice_id): \Recurly\Resources\BinaryFile
14661513
/**
14671514
* Apply available credit to a pending or past due charge invoice
14681515
*
1469-
* @param string $invoice_id Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
1516+
* @param string $invoice_id Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. For number with prefix or country code, use `number-` and `prefix`, e.g. `number-TEST-FR1001`
14701517
*
14711518
* @return \Recurly\Resources\Invoice The updated invoice.
14721519
* @link https://developers.recurly.com/api/v2019-10-10#operation/apply_credit_balance
@@ -1480,7 +1527,7 @@ public function applyCreditBalance(string $invoice_id): \Recurly\Resources\Invoi
14801527
/**
14811528
* Collect a pending or past due, automatic invoice
14821529
*
1483-
* @param string $invoice_id Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
1530+
* @param string $invoice_id Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. For number with prefix or country code, use `number-` and `prefix`, e.g. `number-TEST-FR1001`
14841531
* @param array $body The body of the request.
14851532
*
14861533
* @return \Recurly\Resources\Invoice The updated invoice.
@@ -1495,7 +1542,7 @@ public function collectInvoice(string $invoice_id, array $body = []): \Recurly\R
14951542
/**
14961543
* Mark an open invoice as failed
14971544
*
1498-
* @param string $invoice_id Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
1545+
* @param string $invoice_id Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. For number with prefix or country code, use `number-` and `prefix`, e.g. `number-TEST-FR1001`
14991546
*
15001547
* @return \Recurly\Resources\Invoice The updated invoice.
15011548
* @link https://developers.recurly.com/api/v2019-10-10#operation/fail_invoice
@@ -1509,7 +1556,7 @@ public function failInvoice(string $invoice_id): \Recurly\Resources\Invoice
15091556
/**
15101557
* Mark an open invoice as successful
15111558
*
1512-
* @param string $invoice_id Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
1559+
* @param string $invoice_id Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. For number with prefix or country code, use `number-` and `prefix`, e.g. `number-TEST-FR1001`
15131560
*
15141561
* @return \Recurly\Resources\Invoice The updated invoice.
15151562
* @link https://developers.recurly.com/api/v2019-10-10#operation/mark_invoice_successful
@@ -1523,7 +1570,7 @@ public function markInvoiceSuccessful(string $invoice_id): \Recurly\Resources\In
15231570
/**
15241571
* Reopen a closed, manual invoice
15251572
*
1526-
* @param string $invoice_id Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
1573+
* @param string $invoice_id Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. For number with prefix or country code, use `number-` and `prefix`, e.g. `number-TEST-FR1001`
15271574
*
15281575
* @return \Recurly\Resources\Invoice The updated invoice.
15291576
* @link https://developers.recurly.com/api/v2019-10-10#operation/reopen_invoice
@@ -1537,7 +1584,7 @@ public function reopenInvoice(string $invoice_id): \Recurly\Resources\Invoice
15371584
/**
15381585
* Void a credit invoice.
15391586
*
1540-
* @param string $invoice_id Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
1587+
* @param string $invoice_id Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. For number with prefix or country code, use `number-` and `prefix`, e.g. `number-TEST-FR1001`
15411588
*
15421589
* @return \Recurly\Resources\Invoice The updated invoice.
15431590
* @link https://developers.recurly.com/api/v2019-10-10#operation/void_invoice
@@ -1551,7 +1598,7 @@ public function voidInvoice(string $invoice_id): \Recurly\Resources\Invoice
15511598
/**
15521599
* Record an external payment for a manual invoices.
15531600
*
1554-
* @param string $invoice_id Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
1601+
* @param string $invoice_id Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. For number with prefix or country code, use `number-` and `prefix`, e.g. `number-TEST-FR1001`
15551602
* @param array $body The body of the request.
15561603
*
15571604
* @return \Recurly\Resources\Transaction The recorded transaction.
@@ -1566,7 +1613,7 @@ public function recordExternalTransaction(string $invoice_id, array $body): \Rec
15661613
/**
15671614
* List an invoice's line items
15681615
*
1569-
* @param string $invoice_id Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
1616+
* @param string $invoice_id Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. For number with prefix or country code, use `number-` and `prefix`, e.g. `number-TEST-FR1001`
15701617
* @param array $options Associative array of optional parameters
15711618
*
15721619
* Supported optional query string parameters:
@@ -1607,7 +1654,7 @@ public function listInvoiceLineItems(string $invoice_id, array $options = []): \
16071654
/**
16081655
* List the coupon redemptions applied to an invoice
16091656
*
1610-
* @param string $invoice_id Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
1657+
* @param string $invoice_id Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. For number with prefix or country code, use `number-` and `prefix`, e.g. `number-TEST-FR1001`
16111658
* @param array $options Associative array of optional parameters
16121659
*
16131660
* Supported optional query string parameters:
@@ -1643,7 +1690,7 @@ public function listInvoiceCouponRedemptions(string $invoice_id, array $options
16431690
/**
16441691
* List an invoice's related credit or charge invoices
16451692
*
1646-
* @param string $invoice_id Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
1693+
* @param string $invoice_id Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. For number with prefix or country code, use `number-` and `prefix`, e.g. `number-TEST-FR1001`
16471694
*
16481695
* @return \Recurly\Pager A list of the credit or charge invoices associated with the invoice.
16491696
* @link https://developers.recurly.com/api/v2019-10-10#operation/list_related_invoices
@@ -1657,7 +1704,7 @@ public function listRelatedInvoices(string $invoice_id): \Recurly\Pager
16571704
/**
16581705
* Refund an invoice
16591706
*
1660-
* @param string $invoice_id Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
1707+
* @param string $invoice_id Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. For number with prefix or country code, use `number-` and `prefix`, e.g. `number-TEST-FR1001`
16611708
* @param array $body The body of the request.
16621709
*
16631710
* @return \Recurly\Resources\Invoice Returns the new credit invoice.

lib/recurly/resources/add_on.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ public function setState(string $state): void
507507

508508
/**
509509
* Getter method for the tax_code attribute.
510-
* 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`.
510+
* 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.
511511
*
512512
* @return ?string
513513
*/

lib/recurly/resources/invoice.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ class Invoice extends RecurlyResource
3939
private $_state;
4040
private $_subscription_ids;
4141
private $_subtotal;
42+
private $_subtotal_after_discount;
4243
private $_tax;
4344
private $_tax_info;
4445
private $_terms_and_conditions;
@@ -678,6 +679,29 @@ public function setSubtotal(float $subtotal): void
678679
$this->_subtotal = $subtotal;
679680
}
680681

682+
/**
683+
* Getter method for the subtotal_after_discount attribute.
684+
* The summation of charges and credits, after discounts applied.
685+
*
686+
* @return ?float
687+
*/
688+
public function getSubtotalAfterDiscount(): ?float
689+
{
690+
return $this->_subtotal_after_discount;
691+
}
692+
693+
/**
694+
* Setter method for the subtotal_after_discount attribute.
695+
*
696+
* @param float $subtotal_after_discount
697+
*
698+
* @return void
699+
*/
700+
public function setSubtotalAfterDiscount(float $subtotal_after_discount): void
701+
{
702+
$this->_subtotal_after_discount = $subtotal_after_discount;
703+
}
704+
681705
/**
682706
* Getter method for the tax attribute.
683707
* The total tax on this invoice.

lib/recurly/resources/item.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ public function setState(string $state): void
384384

385385
/**
386386
* Getter method for the tax_code attribute.
387-
* 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`.
387+
* 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.
388388
*
389389
* @return ?string
390390
*/

lib/recurly/resources/line_item.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ public function setAddOnId(string $add_on_id): void
164164

165165
/**
166166
* Getter method for the amount attribute.
167-
* `(quantity * unit_amount) - (discount + tax)`
167+
* `(quantity * unit_amount) - discount + tax`
168168
*
169169
* @return ?float
170170
*/
@@ -1066,7 +1066,7 @@ public function setTax(float $tax): void
10661066

10671067
/**
10681068
* Getter method for the tax_code attribute.
1069-
* 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`.
1069+
* 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.
10701070
*
10711071
* @return ?string
10721072
*/

lib/recurly/resources/plan.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ public function setState(string $state): void
611611

612612
/**
613613
* Getter method for the tax_code attribute.
614-
* 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`.
614+
* 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.
615615
*
616616
* @return ?string
617617
*/

0 commit comments

Comments
 (0)