class Nuvemshop::Order

Attributes

app_id[RW]
attributes[RW]
billing_address[RW]
billing_city[RW]
billing_country[RW]
billing_floor[RW]
billing_locality[RW]
billing_name[RW]
billing_number[RW]
billing_phone[RW]
billing_province[RW]
billing_zipcode[RW]
cancel_reason[RW]
cancelled_at[RW]
checkout_enabled[RW]
client_details[RW]
closed_at[RW]
completed_at[RW]
coupon[RW]
created_at[RW]
currency[RW]
customer[RW]
discount[RW]
discount_coupon[RW]
discount_gateway[RW]
extra[RW]
gateway[RW]
gateway_id[RW]
id[RW]
landing_url[RW]
language[RW]
next_action[RW]
note[RW]
number[RW]
owner_note[RW]
paid_at[RW]
payment_details[RW]
payment_status[RW]
products[RW]
promotional_discount[RW]
read_at[RW]
shipped_at[RW]
shipping[RW]
shipping_address[RW]
shipping_cost_customer[RW]
shipping_cost_owner[RW]
shipping_max_days[RW]
shipping_min_days[RW]
shipping_option[RW]
shipping_option_code[RW]
shipping_option_reference[RW]
shipping_pickup_details[RW]
shipping_pickup_type[RW]
shipping_status[RW]
shipping_store_branch_name[RW]
shipping_suboption[RW]
shipping_tracking_number[RW]
shipping_tracking_url[RW]
status[RW]
store_id[RW]
storefront[RW]
subtotal[RW]
token[RW]
total[RW]
total_usd[RW]
updated_at[RW]
weight[RW]

Private Instance Methods

after_initialize() click to toggle source
# File lib/nuvemshop/order.rb, line 17
def after_initialize
  assing_variables
end
assing_variables() click to toggle source
# File lib/nuvemshop/order.rb, line 21
def assing_variables
  @promotional_discount = Order::PromotionalDiscount.new(promotional_discount)
  @completed_at = Extras::Timestampz.new(completed_at)
  @payment_details = Order::PaymentDetails.new(payment_details)
  @customer = Customer.new(customer)
  @products = products&.map { |prod| Product.new(prod) } || []
  @client_details = Order::ClientDetails.new(client_details)
end