@@ -536,6 +536,109 @@ public function listAccountCreditPayments(string $account_id, array $options = [
536536 return new \Recurly \Pager ($ this , $ path , $ options );
537537 }
538538
539+ /**
540+ * List external accounts for an account
541+ *
542+ * @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`.
543+ * @param array $options Associative array of optional parameters
544+ *
545+ * @return \Recurly\Pager A list of external accounts on an account.
546+ * @link https://developers.recurly.com/api/v2021-02-25#operation/list_account_external_account
547+ */
548+ public function listAccountExternalAccount (string $ account_id , array $ options = []): \Recurly \Pager
549+ {
550+ $ path = $ this ->interpolatePath ("/accounts/{account_id}/external_accounts " , ['account_id ' => $ account_id ]);
551+ return new \Recurly \Pager ($ this , $ path , $ options );
552+ }
553+
554+ /**
555+ * Create an external account
556+ *
557+ * @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`.
558+ * @param array $body The body of the request.
559+ * @param array $options Associative array of optional parameters
560+ *
561+ * @return \Recurly\Resources\ExternalAccount A representation of the created external_account.
562+ * @link https://developers.recurly.com/api/v2021-02-25#operation/create_account_external_account
563+ */
564+ public function createAccountExternalAccount (string $ account_id , array $ body , array $ options = []): \Recurly \Resources \ExternalAccount
565+ {
566+ $ path = $ this ->interpolatePath ("/accounts/{account_id}/external_accounts " , ['account_id ' => $ account_id ]);
567+ return $ this ->makeRequest ('POST ' , $ path , $ body , $ options );
568+ }
569+
570+ /**
571+ * Get an external account for an account
572+ *
573+ * @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`.
574+ * @param string $external_account_id External account ID, e.g. `s28zov4fw0cb`.
575+ * @param array $options Associative array of optional parameters
576+ *
577+ * @return \Recurly\Resources\ExternalAccount A external account on an account.
578+ * @link https://developers.recurly.com/api/v2021-02-25#operation/get_account_external_account
579+ */
580+ public function getAccountExternalAccount (string $ account_id , string $ external_account_id , array $ options = []): \Recurly \Resources \ExternalAccount
581+ {
582+ $ path = $ this ->interpolatePath ("/accounts/{account_id}/external_accounts/{external_account_id} " , ['account_id ' => $ account_id , 'external_account_id ' => $ external_account_id ]);
583+ return $ this ->makeRequest ('GET ' , $ path , [], $ options );
584+ }
585+
586+ /**
587+ * Update an external account
588+ *
589+ * @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`.
590+ * @param string $external_account_id External account ID, e.g. `s28zov4fw0cb`.
591+ * @param array $body The body of the request.
592+ * @param array $options Associative array of optional parameters
593+ *
594+ * @return \Recurly\Resources\ExternalAccount A representation of the updated external_account.
595+ * @link https://developers.recurly.com/api/v2021-02-25#operation/update_account_external_account
596+ */
597+ public function updateAccountExternalAccount (string $ account_id , string $ external_account_id , array $ body , array $ options = []): \Recurly \Resources \ExternalAccount
598+ {
599+ $ path = $ this ->interpolatePath ("/accounts/{account_id}/external_accounts/{external_account_id} " , ['account_id ' => $ account_id , 'external_account_id ' => $ external_account_id ]);
600+ return $ this ->makeRequest ('PUT ' , $ path , $ body , $ options );
601+ }
602+
603+ /**
604+ * Delete an external account for an account
605+ *
606+ * @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`.
607+ * @param string $external_account_id External account ID, e.g. `s28zov4fw0cb`.
608+ * @param array $options Associative array of optional parameters
609+ *
610+ * @return \Recurly\Resources\ExternalAccount Successful Delete
611+ * @link https://developers.recurly.com/api/v2021-02-25#operation/delete_account_external_account
612+ */
613+ public function deleteAccountExternalAccount (string $ account_id , string $ external_account_id , array $ options = []): \Recurly \Resources \ExternalAccount
614+ {
615+ $ path = $ this ->interpolatePath ("/accounts/{account_id}/external_accounts/{external_account_id} " , ['account_id ' => $ account_id , 'external_account_id ' => $ external_account_id ]);
616+ return $ this ->makeRequest ('DELETE ' , $ path , [], $ options );
617+ }
618+
619+ /**
620+ * List the external invoices on an account
621+ *
622+ * @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`.
623+ * @param array $options Associative array of optional parameters
624+ *
625+ * Supported optional query string parameters:
626+ *
627+ * - $options['params']['sort'] (string): Sort field. You *really* only want to sort by `updated_at` in ascending
628+ * order. In descending order updated records will move behind the cursor and could
629+ * prevent some records from being returned.
630+ * - $options['params']['limit'] (int): Limit number of records 1-200.
631+ * - $options['params']['order'] (string): Sort order.
632+ *
633+ * @return \Recurly\Pager A list of the the external_invoices on an account.
634+ * @link https://developers.recurly.com/api/v2021-02-25#operation/list_account_external_invoices
635+ */
636+ public function listAccountExternalInvoices (string $ account_id , array $ options = []): \Recurly \Pager
637+ {
638+ $ path = $ this ->interpolatePath ("/accounts/{account_id}/external_invoices " , ['account_id ' => $ account_id ]);
639+ return new \Recurly \Pager ($ this , $ path , $ options );
640+ }
641+
539642 /**
540643 * List an account's invoices
541644 *
@@ -1567,6 +1670,29 @@ public function getExternalSubscription(string $external_subscription_id, array
15671670 return $ this ->makeRequest ('GET ' , $ path , [], $ options );
15681671 }
15691672
1673+ /**
1674+ * List the external invoices on an external subscription
1675+ *
1676+ * @param string $external_subscription_id External subscription id
1677+ * @param array $options Associative array of optional parameters
1678+ *
1679+ * Supported optional query string parameters:
1680+ *
1681+ * - $options['params']['sort'] (string): Sort field. You *really* only want to sort by `updated_at` in ascending
1682+ * order. In descending order updated records will move behind the cursor and could
1683+ * prevent some records from being returned.
1684+ * - $options['params']['limit'] (int): Limit number of records 1-200.
1685+ * - $options['params']['order'] (string): Sort order.
1686+ *
1687+ * @return \Recurly\Pager A list of the the external_invoices on a site.
1688+ * @link https://developers.recurly.com/api/v2021-02-25#operation/list_external_subscription_external_invoices
1689+ */
1690+ public function listExternalSubscriptionExternalInvoices (string $ external_subscription_id , array $ options = []): \Recurly \Pager
1691+ {
1692+ $ path = $ this ->interpolatePath ("/external_subscriptions/{external_subscription_id}/external_invoices " , ['external_subscription_id ' => $ external_subscription_id ]);
1693+ return new \Recurly \Pager ($ this , $ path , $ options );
1694+ }
1695+
15701696 /**
15711697 * List a site's invoices
15721698 *
@@ -3046,6 +3172,43 @@ public function getInvoiceTemplate(string $invoice_template_id, array $options =
30463172 return $ this ->makeRequest ('GET ' , $ path , [], $ options );
30473173 }
30483174
3175+ /**
3176+ * List the external invoices on a site
3177+ *
3178+ * @param array $options Associative array of optional parameters
3179+ *
3180+ * Supported optional query string parameters:
3181+ *
3182+ * - $options['params']['sort'] (string): Sort field. You *really* only want to sort by `updated_at` in ascending
3183+ * order. In descending order updated records will move behind the cursor and could
3184+ * prevent some records from being returned.
3185+ * - $options['params']['limit'] (int): Limit number of records 1-200.
3186+ * - $options['params']['order'] (string): Sort order.
3187+ *
3188+ * @return \Recurly\Pager A list of the the external_invoices on a site.
3189+ * @link https://developers.recurly.com/api/v2021-02-25#operation/list_external_invoices
3190+ */
3191+ public function listExternalInvoices (array $ options = []): \Recurly \Pager
3192+ {
3193+ $ path = $ this ->interpolatePath ("/external_invoices " , []);
3194+ return new \Recurly \Pager ($ this , $ path , $ options );
3195+ }
3196+
3197+ /**
3198+ * Fetch an external invoice
3199+ *
3200+ * @param string $external_invoice_id External invoice ID, e.g. `e28zov4fw0v2`.
3201+ * @param array $options Associative array of optional parameters
3202+ *
3203+ * @return \Recurly\Resources\ExternalInvoice Returns the external invoice
3204+ * @link https://developers.recurly.com/api/v2021-02-25#operation/show_external_invoice
3205+ */
3206+ public function showExternalInvoice (string $ external_invoice_id , array $ options = []): \Recurly \Resources \ExternalInvoice
3207+ {
3208+ $ path = $ this ->interpolatePath ("/external_invoices/{external_invoice_id} " , ['external_invoice_id ' => $ external_invoice_id ]);
3209+ return $ this ->makeRequest ('GET ' , $ path , [], $ options );
3210+ }
3211+
30493212 /**
30503213 * List entitlements granted to an account
30513214 *
0 commit comments