- A
- C
- I
- M
- N
- R
- S
- T
- ActiveModel::Serialization
Constants
| ATTRIBUTES | = | [:error, :ms_order, :status, :stripe_order, :success].freeze |
Class Public methods
model_name() Link
Source: show
# File app/actions/action/billing/order.rb, line 55 def self.model_name "Billing::Order" end
new(error: nil, ms_order: nil, status: nil, stripe_order: nil, success: false) Link
Source: show
# File app/actions/action/billing/order.rb, line 9 def initialize(error: nil, ms_order: nil, status: nil, stripe_order: nil, success: false) @error = error @ms_order = ms_order @status = status @stripe_order = stripe_order @success = success end
Instance Public methods
as_json(options = {}) Link
Source: show
# File app/actions/action/billing/order.rb, line 51 def as_json(options = {}) super(options).compact end
currency() Link
Source: show
# File app/actions/action/billing/order.rb, line 29 def currency ms_order&.plan&.currency end
id() Link
Source: show
# File app/actions/action/billing/order.rb, line 17 def id stripe_order&.id end
requires_action?() Link
Source: show
# File app/actions/action/billing/order.rb, line 47 def requires_action? %w[requires_action incomplete].include?(stripe_order.status) end
reset!() Link
Source: show
# File app/actions/action/billing/order.rb, line 39 def reset! ATTRIBUTES.each { |attr| send("#{attr}=", nil) } end
set(attrs) Link
Source: show
# File app/actions/action/billing/order.rb, line 33 def set(attrs) reset! attrs.each { |key, value| send("#{key}=", value) } self end
sub_total() Link
Source: show
# File app/actions/action/billing/order.rb, line 21 def sub_total ms_order&.plan&.amount end