Skip to content

Latest commit

 

History

History
48 lines (42 loc) · 1.92 KB

File metadata and controls

48 lines (42 loc) · 1.92 KB

Komoju::Subscription

Properties

Name Type Description Notes
id String A unique 25-character alphanumeric resource identifier.
resource String Resource type name, always "subscription".
status String Current status of the subscription (e.g. "active", "cancelled").
amount Integer Amount greater than or equal to 0, in the lowest denomination of the currency (e.g. cents for USD).
currency Currency
customer SubscriptionCustomer
period SubscriptionPeriod
day Integer Day of the period on which the subscription is charged.
payment_details SubscriptionPaymentDetails
retry_count Integer Number of times payment has been retried after failure.
retry_at Time Timestamp of the next scheduled payment retry, or null.
next_capture_at Time Timestamp of the next scheduled subscription charge.
created_at Time Timestamp when the subscription was created.
ended_at Time Timestamp when the subscription ended, or null if still active.
metadata Object Arbitrary key-value metadata attached to the subscription.
payments Array<Object> Array of payment objects associated with this subscription.

Example

require 'komoju-sdk'

instance = Komoju::Subscription.new(
  id: null,
  resource: null,
  status: null,
  amount: null,
  currency: null,
  customer: null,
  period: null,
  day: null,
  payment_details: null,
  retry_count: null,
  retry_at: null,
  next_capture_at: null,
  created_at: null,
  ended_at: null,
  metadata: null,
  payments: null
)