Skip to content

Commit

Permalink
Merge pull request #779 from recurly/v3-v2021-02-25-5662333064
Browse files Browse the repository at this point in the history
Generated Latest Changes for v2021-02-25 (Ramp Dates, Net Terms, Invoice Business Entity)
  • Loading branch information
csampson authored Jul 26, 2023
2 parents b8ae171 + fe6428e commit 98d4879
Show file tree
Hide file tree
Showing 5 changed files with 290 additions and 39 deletions.
43 changes: 42 additions & 1 deletion lib/recurly/resources/invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class Invoice extends RecurlyResource
private $_id;
private $_line_items;
private $_net_terms;
private $_net_terms_type;
private $_number;
private $_object;
private $_origin;
Expand Down Expand Up @@ -502,7 +503,19 @@ public function setLineItems(array $line_items): void

/**
* Getter method for the net_terms attribute.
* Integer representing the number of days after an invoice's creation that the invoice will become past due. If an invoice's net terms are set to '0', it is due 'On Receipt' and will become past due 24 hours after it’s created. If an invoice is due net 30, it will become past due at 31 days exactly.
* Integer paired with `Net Terms Type` and representing the number
of days past the current date (for `net` Net Terms Type) or days after
the last day of the current month (for `eom` Net Terms Type) that the
invoice will become past due. For any value, an additional 24 hours is
added to ensure the customer has the entire last day to make payment before
becoming past due. For example:
If an invoice is due `net 0`, it is due 'On Receipt' and will become past due 24 hours after it's created.
If an invoice is due `net 30`, it will become past due at 31 days exactly.
If an invoice is due `eom 30`, it will become past due 31 days from the last day of the current month.
When `eom` Net Terms Type is passed, the value for `Net Terms` is restricted to `0, 15, 30, 45, 60, or 90`.
For more information please visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms)
*
* @return ?int
*/
Expand All @@ -523,6 +536,34 @@ public function setNetTerms(int $net_terms): void
$this->_net_terms = $net_terms;
}

/**
* Getter method for the net_terms_type attribute.
* Optionally supplied string that may be either `net` or `eom` (end-of-month).
When `net`, an invoice becomes past due the specified number of `Net Terms` days from the current date.
When `eom` an invoice becomes past due the specified number of `Net Terms` days from the last day of the current month.
This field is only available when the EOM Net Terms feature is enabled.
*
* @return ?string
*/
public function getNetTermsType(): ?string
{
return $this->_net_terms_type;
}

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

/**
* Getter method for the number attribute.
* If VAT taxation and the Country Invoice Sequencing feature are enabled, invoices will have country-specific invoice numbers for invoices billed to EU countries (ex: FR1001). Non-EU invoices will continue to use the site-level invoice number sequence.
Expand Down
24 changes: 24 additions & 0 deletions lib/recurly/resources/invoice_mini.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// phpcs:disable
class InvoiceMini extends RecurlyResource
{
private $_business_entity_id;
private $_id;
private $_number;
private $_object;
Expand All @@ -22,6 +23,29 @@ class InvoiceMini extends RecurlyResource
];


/**
* Getter method for the business_entity_id attribute.
* Unique ID to identify the business entity assigned to the invoice. Available when the `Multiple Business Entities` feature is enabled.
*
* @return ?string
*/
public function getBusinessEntityId(): ?string
{
return $this->_business_entity_id;
}

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

/**
* Getter method for the id attribute.
* Invoice ID
Expand Down
43 changes: 42 additions & 1 deletion lib/recurly/resources/subscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class Subscription extends RecurlyResource
private $_gateway_code;
private $_id;
private $_net_terms;
private $_net_terms_type;
private $_object;
private $_paused_at;
private $_pending_change;
Expand Down Expand Up @@ -626,7 +627,19 @@ public function setId(string $id): void

/**
* Getter method for the net_terms attribute.
* Integer representing the number of days after an invoice's creation that the invoice will become past due. If an invoice's net terms are set to '0', it is due 'On Receipt' and will become past due 24 hours after it’s created. If an invoice is due net 30, it will become past due at 31 days exactly.
* Integer paired with `Net Terms Type` and representing the number
of days past the current date (for `net` Net Terms Type) or days after
the last day of the current month (for `eom` Net Terms Type) that the
invoice will become past due. For any value, an additional 24 hours is
added to ensure the customer has the entire last day to make payment before
becoming past due. For example:
If an invoice is due `net 0`, it is due 'On Receipt' and will become past due 24 hours after it's created.
If an invoice is due `net 30`, it will become past due at 31 days exactly.
If an invoice is due `eom 30`, it will become past due 31 days from the last day of the current month.
When `eom` Net Terms Type is passed, the value for `Net Terms` is restricted to `0, 15, 30, 45, 60, or 90`.
For more information please visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms)
*
* @return ?int
*/
Expand All @@ -647,6 +660,34 @@ public function setNetTerms(int $net_terms): void
$this->_net_terms = $net_terms;
}

/**
* Getter method for the net_terms_type attribute.
* Optionally supplied string that may be either `net` or `eom` (end-of-month).
When `net`, an invoice becomes past due the specified number of `Net Terms` days from the current date.
When `eom` an invoice becomes past due the specified number of `Net Terms` days from the last day of the current month.
This field is only available when the EOM Net Terms feature is enabled.
*
* @return ?string
*/
public function getNetTermsType(): ?string
{
return $this->_net_terms_type;
}

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

/**
* Getter method for the object attribute.
* Object type
Expand Down
48 changes: 48 additions & 0 deletions lib/recurly/resources/subscription_ramp_interval_response.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,39 @@
// phpcs:disable
class SubscriptionRampIntervalResponse extends RecurlyResource
{
private $_ending_on;
private $_remaining_billing_cycles;
private $_starting_billing_cycle;
private $_starting_on;
private $_unit_amount;

protected static $array_hints = [
];


/**
* Getter method for the ending_on attribute.
* Date the ramp interval ends
*
* @return ?string
*/
public function getEndingOn(): ?string
{
return $this->_ending_on;
}

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

/**
* Getter method for the remaining_billing_cycles attribute.
* Represents how many billing cycles are left in a ramp interval.
Expand Down Expand Up @@ -66,6 +91,29 @@ public function setStartingBillingCycle(int $starting_billing_cycle): void
$this->_starting_billing_cycle = $starting_billing_cycle;
}

/**
* Getter method for the starting_on attribute.
* Date the ramp interval starts
*
* @return ?string
*/
public function getStartingOn(): ?string
{
return $this->_starting_on;
}

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

/**
* Getter method for the unit_amount attribute.
* Represents the price for the ramp interval.
Expand Down
Loading

0 comments on commit 98d4879

Please sign in to comment.