Class: Ecommerce::Resources::InvoiceOrder
- Defined in:
- lib/ecommerce/resources/invoice_order.rb
Overview
A wrapper to Ecommerce orders invoice API
- API
-
Documentation: myfreecomm.github.io/passaporte-web/ecommerce/api/index.html
Instance Attribute Summary collapse
-
#activated_at ⇒ Object
readonly
Returns the value of attribute activated_at.
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#amount_with_adjustments ⇒ Object
readonly
Returns the value of attribute amount_with_adjustments.
-
#charge_date ⇒ Object
readonly
Returns the value of attribute charge_date.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#next_payment_date ⇒ Object
readonly
Returns the value of attribute next_payment_date.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#order_url ⇒ Object
readonly
Returns the value of attribute order_url.
-
#paid ⇒ Object
readonly
Returns the value of attribute paid.
-
#payment_method ⇒ Object
readonly
Returns the value of attribute payment_method.
-
#plan_data ⇒ Object
readonly
Returns the value of attribute plan_data.
-
#redeemed_adjustments ⇒ Object
readonly
Returns the value of attribute redeemed_adjustments.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#user_data ⇒ Object
readonly
Returns the value of attribute user_data.
Class Method Summary collapse
-
.find(invoice_order_id, order_id, slug) ⇒ Object
Finds an invoice of an order.
-
.find_all(order_id, slug, page = 1, limit = 20) ⇒ Object
Lists all invoice of an orders and return a collection of invoice with pagination information (represented by Ecommerce::Resources::InvoiceOrderCollection).
Methods inherited from Base
Constructor Details
This class inherits a constructor from Ecommerce::Resources::Base
Instance Attribute Details
#activated_at ⇒ Object (readonly)
Returns the value of attribute activated_at.
10 11 12 |
# File 'lib/ecommerce/resources/invoice_order.rb', line 10 def activated_at @activated_at end |
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
10 11 12 |
# File 'lib/ecommerce/resources/invoice_order.rb', line 10 def amount @amount end |
#amount_with_adjustments ⇒ Object (readonly)
Returns the value of attribute amount_with_adjustments.
10 11 12 |
# File 'lib/ecommerce/resources/invoice_order.rb', line 10 def amount_with_adjustments @amount_with_adjustments end |
#charge_date ⇒ Object (readonly)
Returns the value of attribute charge_date.
10 11 12 |
# File 'lib/ecommerce/resources/invoice_order.rb', line 10 def charge_date @charge_date end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
10 11 12 |
# File 'lib/ecommerce/resources/invoice_order.rb', line 10 def created_at @created_at end |
#next_payment_date ⇒ Object (readonly)
Returns the value of attribute next_payment_date.
10 11 12 |
# File 'lib/ecommerce/resources/invoice_order.rb', line 10 def next_payment_date @next_payment_date end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
10 11 12 |
# File 'lib/ecommerce/resources/invoice_order.rb', line 10 def number @number end |
#order_url ⇒ Object (readonly)
Returns the value of attribute order_url.
10 11 12 |
# File 'lib/ecommerce/resources/invoice_order.rb', line 10 def order_url @order_url end |
#paid ⇒ Object (readonly)
Returns the value of attribute paid.
10 11 12 |
# File 'lib/ecommerce/resources/invoice_order.rb', line 10 def paid @paid end |
#payment_method ⇒ Object (readonly)
Returns the value of attribute payment_method.
10 11 12 |
# File 'lib/ecommerce/resources/invoice_order.rb', line 10 def payment_method @payment_method end |
#plan_data ⇒ Object (readonly)
Returns the value of attribute plan_data.
10 11 12 |
# File 'lib/ecommerce/resources/invoice_order.rb', line 10 def plan_data @plan_data end |
#redeemed_adjustments ⇒ Object (readonly)
Returns the value of attribute redeemed_adjustments.
10 11 12 |
# File 'lib/ecommerce/resources/invoice_order.rb', line 10 def redeemed_adjustments @redeemed_adjustments end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
10 11 12 |
# File 'lib/ecommerce/resources/invoice_order.rb', line 10 def url @url end |
#user_data ⇒ Object (readonly)
Returns the value of attribute user_data.
10 11 12 |
# File 'lib/ecommerce/resources/invoice_order.rb', line 10 def user_data @user_data end |
Class Method Details
.find(invoice_order_id, order_id, slug) ⇒ Object
Finds an invoice of an order
- API
-
Method:
GET /api/orders/:slug/:order_id/invoices/:id/
Documentation: myfreecomm.github.io/passaporte-web/ecommerce/api/orders.html#listagem-das-ordens-de-compra-de-uma-conta
38 39 40 41 42 |
# File 'lib/ecommerce/resources/invoice_order.rb', line 38 def self.find(invoice_order_id, order_id, slug) client.get("/api/orders/#{slug}/#{order_id}/invoices/#{invoice_order_id}/") do |response| build_invoice(response) end end |
.find_all(order_id, slug, page = 1, limit = 20) ⇒ Object
Lists all invoice of an orders and return a collection of invoice with pagination information (represented by Ecommerce::Resources::InvoiceOrderCollection)
- API
-
Method:
GET /api/orders/:slug/:id/invoices/
Documentation: myfreecomm.github.io/passaporte-web/ecommerce/api/orders.html#listagem-das-ordens-de-compra-de-uma-conta
23 24 25 26 27 28 |
# File 'lib/ecommerce/resources/invoice_order.rb', line 23 def self.find_all(order_id, slug, page = 1, limit = 20) body = { page: page, limit: limit } client.get("/api/orders/#{slug}/#{order_id}/invoices/", body: body) do |response| Ecommerce::Resources::InvoiceOrderCollection.build(response) end end |