Order

attr_accessor :created_in_the_past (permit to create orders in the past through attribute created_at)

Propriedades do Objeto

Nome Tipo Descrição
student_id Integer

Student that the order belongs to

school_id Integer

School that the order belongs to

gateway_credential_id Integer

Gateway used in the order

coupon_id Integer

Coupon used in the order

amount_to_pay Integer

Order's amount to pay (price with discounts)

total Integer

Order's total (price without discounts)

kind Integer

Type number (0..3) of the order

period Integer

Period number (0..4) of the order

confirmed_at DateTime

When the order was confirmed

created_at DateTime

When the order was created

next_invoice_at DateTime

Next invoice

uuid String

Order's external id

status String

Order's status (initiated, processing, no_wait_processing, confirmed and canceled)

gateway_reference String

Order's "id" in the gateway

response Text

Response of the gateway

message Text

Message of the gateway

test Boolean

Gateway used um sandbox or production

success Boolean

Response success to the gateway

items_attributes Array<Hash>

An array of items attributes to create or update with the object

items_attributes[school_id] Integer

School that the item belongs to

items_attributes[payment_option_id] Integer

PaymentOption that the item belongs to

items_attributes[coupon_token_id] Integer

Coupon token used

items_attributes[quantity] Integer

Product quantity

items_attributes[total] Integer

Item's price without discounts

items_attributes[amount_to_pay] Integer

Item's price with discouts

items_attributes[amount_to_pay_in_credits] Integer

Item's price in credits with discouts

items_attributes[total_in_credits] Integer

Item's price in credits without discounts

items_attributes[created_at] DateTime

Item's created date

invoices_attributes Array<Hash>

An array of invoice attributes to create or update with the object

invoices_attributes[school_id] Integer

Invoice's School

invoices_attributes[amount] Integer

Invoice's price

invoices_attributes[occurrence] Integer

Invoice's occurrence

invoices_attributes[status] String

Invoice's status (unsent, open, waiting_confirmation, paid, unpaid and overdue)

invoices_attributes[uuid] String

Invoice's external id

invoices_attributes[next_charge_at] DateTime

Next charging

invoices_attributes[created_at] DateTime

Invoice's created date

payments_attributes Array<Hash>

An array of payments attributes to create or update with the object

invoices_attributes[payments_attributes][school_id] Integer

Payment school

invoices_attributes[payments_attributes][amount] Integer

Payment price

invoices_attributes[payments_attributes][kind] String

Payment kind (0..3)

invoices_attributes[payments_attributes][status] String

Payment status (unsent, failed, initiated, under_analysis, waiting_boleto, canceled, authorized, confirmed, reversed and refunded)

invoices_attributes[payments_attributes][uuid] String

Payment external id

invoices_attributes[payments_attributes][gateway_reference] String

Gateway "id" for payment

invoices_attributes[payments_attributes][link] String

Payment link

invoices_attributes[payments_attributes][boleto_code] String

Payment boleto code

invoices_attributes[payments_attributes][cardholder] String

Payment cardholder

invoices_attributes[payments_attributes][response] Text

Gateway response

invoices_attributes[payments_attributes][message] Text

Gateway message

invoices_attributes[payments_attributes][success] Boolean

Gateway response sucess

invoices_attributes[payments_attributes][test] Boolean

Gateway used sandbox or production

invoices_attributes[payments_attributes][installments] Integer

(required with common order with credit card)

invoices_attributes[payments_attributes][gateway_fees] Integer

Gateway fees

invoices_attributes[payments_attributes][created_at] DateTime

Payment created date