Class: Rafflesia::SubscriptionSummary
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::SubscriptionSummary
- Defined in:
- lib/rafflesia/billing/subscription_summary.rb
Constant Summary collapse
- HASH_ATTRS =
{ access: :access, available_checkout_plans: :available_checkout_plans, billing_enabled: :billing_enabled, billing_enforced: :billing_enforced, can_cancel_pending_switch: :can_cancel_pending_switch, can_manage_subscription: :can_manage_subscription, can_start_checkout: :can_start_checkout, can_switch_plan: :can_switch_plan, cancel_at_period_end: :cancel_at_period_end, checked_live: :checked_live, currency: :currency, current_period_end: :current_period_end, current_period_end_at: :current_period_end_at, current_period_start: :current_period_start, customer_id: :customer_id, has_subscription_history: :has_subscription_history, interval: :interval, is_configured: :is_configured, organization_id: :organization_id, pending_change_date: :pending_change_date, pending_plan: :pending_plan, plan: :plan, plan_id: :plan_id, plan_name: :plan_name, price_id: :price_id, reason: :reason, status: :status, subscription_id: :subscription_id, unit_amount_cents: :unit_amount_cents, usage_limit_usd: :usage_limit_usd }.freeze
Instance Attribute Summary collapse
-
#access ⇒ Object
Returns the value of attribute access.
-
#available_checkout_plans ⇒ Object
Returns the value of attribute available_checkout_plans.
-
#billing_enabled ⇒ Object
Returns the value of attribute billing_enabled.
-
#billing_enforced ⇒ Object
Returns the value of attribute billing_enforced.
-
#can_cancel_pending_switch ⇒ Object
Returns the value of attribute can_cancel_pending_switch.
-
#can_manage_subscription ⇒ Object
Returns the value of attribute can_manage_subscription.
-
#can_start_checkout ⇒ Object
Returns the value of attribute can_start_checkout.
-
#can_switch_plan ⇒ Object
Returns the value of attribute can_switch_plan.
-
#cancel_at_period_end ⇒ Object
Returns the value of attribute cancel_at_period_end.
-
#checked_live ⇒ Object
Returns the value of attribute checked_live.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#current_period_end ⇒ Object
Returns the value of attribute current_period_end.
-
#current_period_end_at ⇒ Object
Returns the value of attribute current_period_end_at.
-
#current_period_start ⇒ Object
Returns the value of attribute current_period_start.
-
#customer_id ⇒ Object
Returns the value of attribute customer_id.
-
#has_subscription_history ⇒ Object
Returns the value of attribute has_subscription_history.
-
#interval ⇒ Object
Returns the value of attribute interval.
-
#is_configured ⇒ Object
Returns the value of attribute is_configured.
-
#organization_id ⇒ Object
Returns the value of attribute organization_id.
-
#pending_change_date ⇒ Object
Returns the value of attribute pending_change_date.
-
#pending_plan ⇒ Object
Returns the value of attribute pending_plan.
-
#plan ⇒ Object
Returns the value of attribute plan.
-
#plan_id ⇒ Object
Returns the value of attribute plan_id.
-
#plan_name ⇒ Object
Returns the value of attribute plan_name.
-
#price_id ⇒ Object
Returns the value of attribute price_id.
-
#reason ⇒ Object
Returns the value of attribute reason.
-
#status ⇒ Object
Returns the value of attribute status.
-
#subscription_id ⇒ Object
Returns the value of attribute subscription_id.
-
#unit_amount_cents ⇒ Object
Returns the value of attribute unit_amount_cents.
-
#usage_limit_usd ⇒ Object
Returns the value of attribute usage_limit_usd.
Instance Method Summary collapse
-
#initialize(json) ⇒ SubscriptionSummary
constructor
A new instance of SubscriptionSummary.
Constructor Details
#initialize(json) ⇒ SubscriptionSummary
Returns a new instance of SubscriptionSummary.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/rafflesia/billing/subscription_summary.rb', line 73 def initialize(json) super() hash = self.class.normalize(json) @access = hash[:access] @available_checkout_plans = (hash[:available_checkout_plans] || []) @billing_enabled = hash[:billing_enabled] @billing_enforced = hash[:billing_enforced] @can_cancel_pending_switch = hash[:can_cancel_pending_switch] @can_manage_subscription = hash[:can_manage_subscription] @can_start_checkout = hash[:can_start_checkout] @can_switch_plan = hash[:can_switch_plan] @cancel_at_period_end = hash[:cancel_at_period_end] @checked_live = hash[:checked_live] @currency = hash[:currency] @current_period_end = hash[:current_period_end] @current_period_end_at = hash[:current_period_end_at] @current_period_start = hash[:current_period_start] @customer_id = hash[:customer_id] @has_subscription_history = hash[:has_subscription_history] @interval = hash[:interval] @is_configured = hash[:is_configured] @organization_id = hash[:organization_id] @pending_change_date = hash[:pending_change_date] @pending_plan = hash[:pending_plan] @plan = hash[:plan] @plan_id = hash[:plan_id] @plan_name = hash[:plan_name] @price_id = hash[:price_id] @reason = hash[:reason] @status = hash[:status] @subscription_id = hash[:subscription_id] @unit_amount_cents = hash[:unit_amount_cents] @usage_limit_usd = hash[:usage_limit_usd] end |
Instance Attribute Details
#access ⇒ Object
Returns the value of attribute access.
41 42 43 |
# File 'lib/rafflesia/billing/subscription_summary.rb', line 41 def access @access end |
#available_checkout_plans ⇒ Object
Returns the value of attribute available_checkout_plans.
41 42 43 |
# File 'lib/rafflesia/billing/subscription_summary.rb', line 41 def available_checkout_plans @available_checkout_plans end |
#billing_enabled ⇒ Object
Returns the value of attribute billing_enabled.
41 42 43 |
# File 'lib/rafflesia/billing/subscription_summary.rb', line 41 def billing_enabled @billing_enabled end |
#billing_enforced ⇒ Object
Returns the value of attribute billing_enforced.
41 42 43 |
# File 'lib/rafflesia/billing/subscription_summary.rb', line 41 def billing_enforced @billing_enforced end |
#can_cancel_pending_switch ⇒ Object
Returns the value of attribute can_cancel_pending_switch.
41 42 43 |
# File 'lib/rafflesia/billing/subscription_summary.rb', line 41 def can_cancel_pending_switch @can_cancel_pending_switch end |
#can_manage_subscription ⇒ Object
Returns the value of attribute can_manage_subscription.
41 42 43 |
# File 'lib/rafflesia/billing/subscription_summary.rb', line 41 def can_manage_subscription @can_manage_subscription end |
#can_start_checkout ⇒ Object
Returns the value of attribute can_start_checkout.
41 42 43 |
# File 'lib/rafflesia/billing/subscription_summary.rb', line 41 def can_start_checkout @can_start_checkout end |
#can_switch_plan ⇒ Object
Returns the value of attribute can_switch_plan.
41 42 43 |
# File 'lib/rafflesia/billing/subscription_summary.rb', line 41 def can_switch_plan @can_switch_plan end |
#cancel_at_period_end ⇒ Object
Returns the value of attribute cancel_at_period_end.
41 42 43 |
# File 'lib/rafflesia/billing/subscription_summary.rb', line 41 def cancel_at_period_end @cancel_at_period_end end |
#checked_live ⇒ Object
Returns the value of attribute checked_live.
41 42 43 |
# File 'lib/rafflesia/billing/subscription_summary.rb', line 41 def checked_live @checked_live end |
#currency ⇒ Object
Returns the value of attribute currency.
41 42 43 |
# File 'lib/rafflesia/billing/subscription_summary.rb', line 41 def currency @currency end |
#current_period_end ⇒ Object
Returns the value of attribute current_period_end.
41 42 43 |
# File 'lib/rafflesia/billing/subscription_summary.rb', line 41 def current_period_end @current_period_end end |
#current_period_end_at ⇒ Object
Returns the value of attribute current_period_end_at.
41 42 43 |
# File 'lib/rafflesia/billing/subscription_summary.rb', line 41 def current_period_end_at @current_period_end_at end |
#current_period_start ⇒ Object
Returns the value of attribute current_period_start.
41 42 43 |
# File 'lib/rafflesia/billing/subscription_summary.rb', line 41 def current_period_start @current_period_start end |
#customer_id ⇒ Object
Returns the value of attribute customer_id.
41 42 43 |
# File 'lib/rafflesia/billing/subscription_summary.rb', line 41 def customer_id @customer_id end |
#has_subscription_history ⇒ Object
Returns the value of attribute has_subscription_history.
41 42 43 |
# File 'lib/rafflesia/billing/subscription_summary.rb', line 41 def has_subscription_history @has_subscription_history end |
#interval ⇒ Object
Returns the value of attribute interval.
41 42 43 |
# File 'lib/rafflesia/billing/subscription_summary.rb', line 41 def interval @interval end |
#is_configured ⇒ Object
Returns the value of attribute is_configured.
41 42 43 |
# File 'lib/rafflesia/billing/subscription_summary.rb', line 41 def is_configured @is_configured end |
#organization_id ⇒ Object
Returns the value of attribute organization_id.
41 42 43 |
# File 'lib/rafflesia/billing/subscription_summary.rb', line 41 def organization_id @organization_id end |
#pending_change_date ⇒ Object
Returns the value of attribute pending_change_date.
41 42 43 |
# File 'lib/rafflesia/billing/subscription_summary.rb', line 41 def pending_change_date @pending_change_date end |
#pending_plan ⇒ Object
Returns the value of attribute pending_plan.
41 42 43 |
# File 'lib/rafflesia/billing/subscription_summary.rb', line 41 def pending_plan @pending_plan end |
#plan ⇒ Object
Returns the value of attribute plan.
41 42 43 |
# File 'lib/rafflesia/billing/subscription_summary.rb', line 41 def plan @plan end |
#plan_id ⇒ Object
Returns the value of attribute plan_id.
41 42 43 |
# File 'lib/rafflesia/billing/subscription_summary.rb', line 41 def plan_id @plan_id end |
#plan_name ⇒ Object
Returns the value of attribute plan_name.
41 42 43 |
# File 'lib/rafflesia/billing/subscription_summary.rb', line 41 def plan_name @plan_name end |
#price_id ⇒ Object
Returns the value of attribute price_id.
41 42 43 |
# File 'lib/rafflesia/billing/subscription_summary.rb', line 41 def price_id @price_id end |
#reason ⇒ Object
Returns the value of attribute reason.
41 42 43 |
# File 'lib/rafflesia/billing/subscription_summary.rb', line 41 def reason @reason end |
#status ⇒ Object
Returns the value of attribute status.
41 42 43 |
# File 'lib/rafflesia/billing/subscription_summary.rb', line 41 def status @status end |
#subscription_id ⇒ Object
Returns the value of attribute subscription_id.
41 42 43 |
# File 'lib/rafflesia/billing/subscription_summary.rb', line 41 def subscription_id @subscription_id end |
#unit_amount_cents ⇒ Object
Returns the value of attribute unit_amount_cents.
41 42 43 |
# File 'lib/rafflesia/billing/subscription_summary.rb', line 41 def unit_amount_cents @unit_amount_cents end |
#usage_limit_usd ⇒ Object
Returns the value of attribute usage_limit_usd.
41 42 43 |
# File 'lib/rafflesia/billing/subscription_summary.rb', line 41 def usage_limit_usd @usage_limit_usd end |