Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated Latest Changes for v2021-02-25 (Ramp Dates, Net Terms, Invoice Business Entity, External Subscriptions) #201

Merged
merged 2 commits into from
Jul 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion external_subscription.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,33 @@ type ExternalSubscription struct {
// An indication of whether or not the external subscription will auto-renew at the expiration date.
AutoRenew bool `json:"auto_renew,omitempty"`

// An indication of whether or not the external subscription is in a grace period.
InGracePeriod bool `json:"in_grace_period,omitempty"`

// Identifier of the app that generated the external subscription.
AppIdentifier string `json:"app_identifier,omitempty"`

// An indication of the quantity of a subscribed item's quantity.
Quantity int `json:"quantity,omitempty"`

// External subscriptions can be active, canceled, expired, or future.
// External subscriptions can be active, canceled, expired, or past_due.
State string `json:"state,omitempty"`

// When the external subscription was activated in the external platform.
ActivatedAt time.Time `json:"activated_at,omitempty"`

// When the external subscription was canceled in the external platform.
CanceledAt time.Time `json:"canceled_at,omitempty"`

// When the external subscription expires in the external platform.
ExpiresAt time.Time `json:"expires_at,omitempty"`

// When the external subscription trial period started in the external platform.
TrialStartedAt time.Time `json:"trial_started_at,omitempty"`

// When the external subscription trial period ends in the external platform.
TrialEndsAt time.Time `json:"trial_ends_at,omitempty"`

// When the external subscription was created in Recurly.
CreatedAt time.Time `json:"created_at,omitempty"`

Expand Down
18 changes: 17 additions & 1 deletion invoice.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,25 @@ type Invoice struct {
// For manual invoicing, this identifies the PO number associated with the subscription.
PoNumber string `json:"po_number,omitempty"`

// 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)
NetTerms int `json:"net_terms,omitempty"`

// 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.
NetTermsType string `json:"net_terms_type,omitempty"`

Address InvoiceAddress `json:"address,omitempty"`

ShippingAddress ShippingAddress `json:"shipping_address,omitempty"`
Expand Down
18 changes: 17 additions & 1 deletion invoice_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,25 @@ type InvoiceCreate struct {
// This will default to the Customer Notes text specified on the Invoice Settings for credit invoices. Specify customer notes to add or override Customer Notes on credit invoices.
CreditCustomerNotes *string `json:"credit_customer_notes,omitempty"`

// 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)
NetTerms *int `json:"net_terms,omitempty"`

// 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.
NetTermsType *string `json:"net_terms_type,omitempty"`

// For manual invoicing, this identifies the PO number associated with the subscription.
PoNumber *string `json:"po_number,omitempty"`

Expand Down
3 changes: 3 additions & 0 deletions invoice_mini.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ type InvoiceMini struct {
// Invoice number
Number string `json:"number,omitempty"`

// Unique ID to identify the business entity assigned to the invoice. Available when the `Multiple Business Entities` feature is enabled.
BusinessEntityId string `json:"business_entity_id,omitempty"`

// Invoice type
Type string `json:"type,omitempty"`

Expand Down
Loading