Skip to content

Commit

Permalink
Generated Latest Changes for v2021-02-25
Browse files Browse the repository at this point in the history
  • Loading branch information
Recurly Integrations authored Jul 2, 2024
1 parent f0162fe commit 586da67
Show file tree
Hide file tree
Showing 12 changed files with 1,889 additions and 38 deletions.
117 changes: 113 additions & 4 deletions lib/recurly/client.php
Original file line number Diff line number Diff line change
Expand Up @@ -1337,7 +1337,7 @@ public function listCustomFieldDefinitions(array $options = []): \Recurly\Pager
* @param string $custom_field_definition_id Custom Field Definition ID
* @param array $options Associative array of optional parameters
*
* @return \Recurly\Resources\CustomFieldDefinition An custom field definition.
* @return \Recurly\Resources\CustomFieldDefinition A custom field definition.
* @link https://developers.recurly.com/api/v2021-02-25#operation/get_custom_field_definition
*/
public function getCustomFieldDefinition(string $custom_field_definition_id, array $options = []): \Recurly\Resources\CustomFieldDefinition
Expand All @@ -1346,6 +1346,115 @@ public function getCustomFieldDefinition(string $custom_field_definition_id, arr
return $this->makeRequest('GET', $path, [], $options);
}

/**
* Create a new general ledger account
*
* @param array $body The body of the request.
* @param array $options Associative array of optional parameters
*
* @return \Recurly\Resources\GeneralLedgerAccount A new general ledger account.
* @link https://developers.recurly.com/api/v2021-02-25#operation/create_general_ledger_account
*/
public function createGeneralLedgerAccount(array $body, array $options = []): \Recurly\Resources\GeneralLedgerAccount
{
$path = $this->interpolatePath("/general_ledger_accounts", []);
return $this->makeRequest('POST', $path, $body, $options);
}

/**
* List a site's general ledger accounts
*
* @param array $options Associative array of optional parameters
*
* Supported optional query string parameters:
*
* - $options['params']['ids'] (array): Filter results by their IDs. Up to 200 IDs can be passed at once using
* commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`.
*
* **Important notes:**
*
* * The `ids` parameter cannot be used with any other ordering or filtering
* parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc)
* * Invalid or unknown IDs will be ignored, so you should check that the
* results correspond to your request.
* * Records are returned in an arbitrary order. Since results are all
* returned at once you can sort the records yourself.
* - $options['params']['limit'] (int): Limit number of records 1-200.
* - $options['params']['order'] (string): Sort order.
* - $options['params']['sort'] (string): Sort field. You *really* only want to sort by `updated_at` in ascending
* order. In descending order updated records will move behind the cursor and could
* prevent some records from being returned.
* - $options['params']['account_type'] (string): General Ledger Account type by which to filter the response.
*
* @return \Recurly\Pager A list of the site's general ledger accounts.
* @link https://developers.recurly.com/api/v2021-02-25#operation/list_general_ledger_accounts
*/
public function listGeneralLedgerAccounts(array $options = []): \Recurly\Pager
{
$path = $this->interpolatePath("/general_ledger_accounts", []);
return new \Recurly\Pager($this, $path, $options);
}

/**
* Fetch a general ledger account
*
* @param string $general_ledger_account_id General Ledger Account ID
* @param array $options Associative array of optional parameters
*
* @return \Recurly\Resources\GeneralLedgerAccount A general ledger account.
* @link https://developers.recurly.com/api/v2021-02-25#operation/get_general_ledger_account
*/
public function getGeneralLedgerAccount(string $general_ledger_account_id, array $options = []): \Recurly\Resources\GeneralLedgerAccount
{
$path = $this->interpolatePath("/general_ledger_accounts/{general_ledger_account_id}", ['general_ledger_account_id' => $general_ledger_account_id]);
return $this->makeRequest('GET', $path, [], $options);
}

/**
* Update a general ledger account
*
* @param string $general_ledger_account_id General Ledger Account ID
* @param array $body The body of the request.
* @param array $options Associative array of optional parameters
*
* @return \Recurly\Resources\GeneralLedgerAccount The updated general ledger account.
* @link https://developers.recurly.com/api/v2021-02-25#operation/update_general_ledger_account
*/
public function updateGeneralLedgerAccount(string $general_ledger_account_id, array $body, array $options = []): \Recurly\Resources\GeneralLedgerAccount
{
$path = $this->interpolatePath("/general_ledger_accounts/{general_ledger_account_id}", ['general_ledger_account_id' => $general_ledger_account_id]);
return $this->makeRequest('PUT', $path, $body, $options);
}

/**
* Get a single Performance Obligation.
*
* @param string $performance_obligation_id Performance Obligation id.
* @param array $options Associative array of optional parameters
*
* @return \Recurly\Resources\PerformanceObligation A single Performance Obligation.
* @link https://developers.recurly.com/api/v2021-02-25#operation/get_performance_obligation
*/
public function getPerformanceObligation(string $performance_obligation_id, array $options = []): \Recurly\Resources\PerformanceObligation
{
$path = $this->interpolatePath("/performance_obligations/{performance_obligation_id}", ['performance_obligation_id' => $performance_obligation_id]);
return $this->makeRequest('GET', $path, [], $options);
}

/**
* Get a site's Performance Obligations
*
* @param array $options Associative array of optional parameters
*
* @return \Recurly\Pager A list of Performance Obligations.
* @link https://developers.recurly.com/api/v2021-02-25#operation/get_performance_obligations
*/
public function getPerformanceObligations(array $options = []): \Recurly\Pager
{
$path = $this->interpolatePath("/performance_obligations", []);
return new \Recurly\Pager($this, $path, $options);
}

/**
* List an invoice template's associated accounts
*
Expand Down Expand Up @@ -1774,7 +1883,7 @@ public function listExternalSubscriptions(array $options = []): \Recurly\Pager
/**
* Fetch an external subscription
*
* @param string $external_subscription_id External subscription id
* @param string $external_subscription_id External subscription ID or external_id. For ID no prefix is used e.g. `e28zov4fw0v2`. For external_id use prefix `external-id-`, e.g. `external-id-123456`.
* @param array $options Associative array of optional parameters
*
* @return \Recurly\Resources\ExternalSubscription Settings for an external subscription.
Expand Down Expand Up @@ -3396,13 +3505,13 @@ public function listExternalSubscriptionExternalPaymentPhases(string $external_s
}

/**
* Fetch an external payment_phase
* Fetch an external payment phase
*
* @param string $external_subscription_id External subscription id
* @param string $external_payment_phase_id External payment phase ID, e.g. `a34ypb2ef9w1`.
* @param array $options Associative array of optional parameters
*
* @return \Recurly\Resources\ExternalPaymentPhase Details for an external payment_phase.
* @return \Recurly\Resources\ExternalPaymentPhase Details for an external payment phase.
* @link https://developers.recurly.com/api/v2021-02-25#operation/get_external_subscription_external_payment_phase
*/
public function getExternalSubscriptionExternalPaymentPhase(string $external_subscription_id, string $external_payment_phase_id, array $options = []): \Recurly\Resources\ExternalPaymentPhase
Expand Down
81 changes: 81 additions & 0 deletions lib/recurly/resources/add_on.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,15 @@ class AddOn extends RecurlyResource
private $_external_sku;
private $_id;
private $_item;
private $_liability_gl_account_id;
private $_measured_unit_id;
private $_name;
private $_object;
private $_optional;
private $_percentage_tiers;
private $_performance_obligation_id;
private $_plan_id;
private $_revenue_gl_account_id;
private $_revenue_schedule_type;
private $_state;
private $_tax_code;
Expand Down Expand Up @@ -348,6 +351,32 @@ public function setItem(\Recurly\Resources\ItemMini $item): void
$this->_item = $item;
}

/**
* Getter method for the liability_gl_account_id attribute.
* The ID of a general ledger account. General ledger accounts are
only accessible as a part of the Recurly RevRec Standard and
Recurly RevRec Advanced features.
*
* @return ?string
*/
public function getLiabilityGlAccountId(): ?string
{
return $this->_liability_gl_account_id;
}

/**
* Setter method for the liability_gl_account_id attribute.
*
* @param string $liability_gl_account_id
*
* @return void
*/
public function setLiabilityGlAccountId(string $liability_gl_account_id): void
{
$this->_liability_gl_account_id = $liability_gl_account_id;
}

/**
* Getter method for the measured_unit_id attribute.
* System-generated unique identifier for an measured unit associated with the add-on.
Expand Down Expand Up @@ -463,6 +492,32 @@ public function setPercentageTiers(array $percentage_tiers): void
$this->_percentage_tiers = $percentage_tiers;
}

/**
* Getter method for the performance_obligation_id attribute.
* The ID of a performance obligation. Performance obligations are
only accessible as a part of the Recurly RevRec Standard and
Recurly RevRec Advanced features.
*
* @return ?string
*/
public function getPerformanceObligationId(): ?string
{
return $this->_performance_obligation_id;
}

/**
* Setter method for the performance_obligation_id attribute.
*
* @param string $performance_obligation_id
*
* @return void
*/
public function setPerformanceObligationId(string $performance_obligation_id): void
{
$this->_performance_obligation_id = $performance_obligation_id;
}

/**
* Getter method for the plan_id attribute.
* Plan ID
Expand All @@ -486,6 +541,32 @@ public function setPlanId(string $plan_id): void
$this->_plan_id = $plan_id;
}

/**
* Getter method for the revenue_gl_account_id attribute.
* The ID of a general ledger account. General ledger accounts are
only accessible as a part of the Recurly RevRec Standard and
Recurly RevRec Advanced features.
*
* @return ?string
*/
public function getRevenueGlAccountId(): ?string
{
return $this->_revenue_gl_account_id;
}

/**
* Setter method for the revenue_gl_account_id attribute.
*
* @param string $revenue_gl_account_id
*
* @return void
*/
public function setRevenueGlAccountId(string $revenue_gl_account_id): void
{
$this->_revenue_gl_account_id = $revenue_gl_account_id;
}

/**
* Getter method for the revenue_schedule_type attribute.
* When this add-on is invoiced, the line item will use this revenue schedule. If `item_code`/`item_id` is part of the request then `revenue_schedule_type` must be absent in the request as the value will be set from the item.
Expand Down
Loading

0 comments on commit 586da67

Please sign in to comment.