Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Latest commit

 

History

History
50 lines (44 loc) · 3.72 KB

AppliedCouponObject.md

File metadata and controls

50 lines (44 loc) · 3.72 KB

LagoAPI::AppliedCouponObject

Properties

Name Type Description Notes
lago_id String Unique identifier of the applied coupon, created by Lago.
lago_coupon_id String Unique identifier of the coupon, created by Lago.
coupon_code String Unique code used to identify the coupon.
coupon_name String The name of the coupon.
lago_customer_id String Unique identifier of the customer, created by Lago.
external_customer_id String The customer external unique identifier (provided by your own application)
status String The status of the coupon. Can be either `active` or `terminated`.
amount_cents Integer The amount of the coupon in cents. This field is required only for coupon with `fixed_amount` type. [optional]
amount_cents_remaining Integer The remaining amount in cents for a `fixed_amount` coupon with a frequency set to `once`. This field indicates the remaining balance or value that can still be utilized from the coupon. [optional]
amount_currency Currency [optional]
percentage_rate String The percentage rate of the coupon. This field is required only for coupons with a `percentage` coupon type. [optional]
frequency String The type of frequency for the coupon. It can have three possible values: `once`, `recurring` or `forever`. - If set to `once`, the coupon is applicable only for a single use. - If set to `recurring`, the coupon can be used multiple times for recurring billing periods. - If set to `forever`, the coupon has unlimited usage and can be applied indefinitely.
frequency_duration Integer Specifies the number of billing periods to which the coupon applies. This field is required only for coupons with a `recurring` frequency type [optional]
frequency_duration_remaining Integer The remaining number of billing periods to which the coupon is applicable. This field determines the remaining usage or availability of the coupon based on the remaining billing periods. [optional]
expiration_at Time The date and time after which the coupon will stop applying to customer's invoices. Once the expiration date is reached, the coupon will no longer be applicable, and any further invoices generated for the customer will not include the coupon discount. [optional]
created_at Time The date and time when the coupon was assigned to a customer. It is expressed in UTC format according to the ISO 8601 datetime standard.
terminated_at Time This field indicates the specific moment when the coupon amount is fully utilized or when the coupon is removed from the customer's coupon list. It is expressed in UTC format according to the ISO 8601 datetime standard. [optional]

Example

require 'lago_ruby'

instance = LagoAPI::AppliedCouponObject.new(
  lago_id: 1a901a90-1a90-1a90-1a90-1a901a901a90,
  lago_coupon_id: 1a901a90-1a90-1a90-1a90-1a901a901a90,
  coupon_code: startup_deal,
  coupon_name: Startup Deal,
  lago_customer_id: 1a901a90-1a90-1a90-1a90-1a901a901a90,
  external_customer_id: 5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba,
  status: active,
  amount_cents: 2000,
  amount_cents_remaining: 50,
  amount_currency: null,
  percentage_rate: null,
  frequency: recurring,
  frequency_duration: 3,
  frequency_duration_remaining: 1,
  expiration_at: 2022-04-29T08:59:51Z,
  created_at: 2022-04-29T08:59:51Z,
  terminated_at: 2022-04-29T08:59:51Z
)