Class: Supai::UnitedPickupOrderReport
- Defined in:
- lib/supai/united_pickup_order_report.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#items_quantity ⇒ Object
Returns the value of attribute items_quantity.
-
#special_instructions ⇒ Object
Returns the value of attribute special_instructions.
-
#status ⇒ Object
Returns the value of attribute status.
-
#totes_quantity ⇒ Object
Returns the value of attribute totes_quantity.
Class Method Summary collapse
- .endpoint(chain_id:, store_id:, order_id:) ⇒ Object
- .get(chain_id:, store_id:, order_id:, params: {}, token:, api: API.new) ⇒ Object
Instance Method Summary collapse
-
#initialize(hash) ⇒ UnitedPickupOrderReport
constructor
A new instance of UnitedPickupOrderReport.
Methods inherited from Resource
#as_json, attr_accessor, attr_collections, attr_objects, attr_timestamp_accessor, attributes, #inspect, #parse_collection, #parse_object, #parse_timestamp, #set_attribute, #set_attributes, #underscore
Constructor Details
#initialize(hash) ⇒ UnitedPickupOrderReport
Returns a new instance of UnitedPickupOrderReport.
26 27 28 |
# File 'lib/supai/united_pickup_order_report.rb', line 26 def initialize(hash) set_attributes(hash) end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/supai/united_pickup_order_report.rb', line 3 def id @id end |
#items_quantity ⇒ Object
Returns the value of attribute items_quantity.
3 4 5 |
# File 'lib/supai/united_pickup_order_report.rb', line 3 def items_quantity @items_quantity end |
#special_instructions ⇒ Object
Returns the value of attribute special_instructions.
3 4 5 |
# File 'lib/supai/united_pickup_order_report.rb', line 3 def special_instructions @special_instructions end |
#status ⇒ Object
Returns the value of attribute status.
3 4 5 |
# File 'lib/supai/united_pickup_order_report.rb', line 3 def status @status end |
#totes_quantity ⇒ Object
Returns the value of attribute totes_quantity.
3 4 5 |
# File 'lib/supai/united_pickup_order_report.rb', line 3 def totes_quantity @totes_quantity end |
Class Method Details
.endpoint(chain_id:, store_id:, order_id:) ⇒ Object
8 9 10 |
# File 'lib/supai/united_pickup_order_report.rb', line 8 def self.endpoint(chain_id:, store_id:, order_id:) "/api/ordermanagement/v7/chains/#{chain_id}/stores/#{store_id}/orders/#{order_id}/unitedpickuporderreport" end |
.get(chain_id:, store_id:, order_id:, params: {}, token:, api: API.new) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/supai/united_pickup_order_report.rb', line 12 def self.get(chain_id:, store_id:, order_id:, params: {}, token:, api: API.new) response = api.request( :get, endpoint(chain_id: chain_id, store_id: store_id, order_id: order_id), params: params, headers: { accept: "application/vnd.mywebgrocer.mgmt-united-order-report+json" }, token: token, api: api, ) raise response.error unless response.success? UnitedPickupOrderReport.new(response.json_body) end |