Class: MuffinMan::RequestHelpers::InboundShipmentPlanRequestItem

Inherits:
Base
  • Object
show all
Defined in:
lib/muffin_man/request_helpers/inbound_shipment_plan_request_item.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

json_body

Constructor Details

#initialize(seller_sku, asin, condition, quantity, quantity_in_case: nil, prep_details_list: []) ⇒ InboundShipmentPlanRequestItem

Returns a new instance of InboundShipmentPlanRequestItem.



6
7
8
9
10
11
12
13
# File 'lib/muffin_man/request_helpers/inbound_shipment_plan_request_item.rb', line 6

def initialize(seller_sku, asin, condition, quantity, quantity_in_case: nil, prep_details_list: [])
  @seller_sku = seller_sku
  @asin = asin
  @quantity = quantity
  @condition = condition
  @quantity_in_case = quantity_in_case
  @prep_details_list = prep_details_list
end

Instance Attribute Details

#asinObject (readonly)

Returns the value of attribute asin.



4
5
6
# File 'lib/muffin_man/request_helpers/inbound_shipment_plan_request_item.rb', line 4

def asin
  @asin
end

#conditionObject (readonly)

Returns the value of attribute condition.



4
5
6
# File 'lib/muffin_man/request_helpers/inbound_shipment_plan_request_item.rb', line 4

def condition
  @condition
end

#prep_details_listObject (readonly)

Returns the value of attribute prep_details_list.



4
5
6
# File 'lib/muffin_man/request_helpers/inbound_shipment_plan_request_item.rb', line 4

def prep_details_list
  @prep_details_list
end

#quantityObject (readonly)

Returns the value of attribute quantity.



4
5
6
# File 'lib/muffin_man/request_helpers/inbound_shipment_plan_request_item.rb', line 4

def quantity
  @quantity
end

#quantity_in_caseObject (readonly)

Returns the value of attribute quantity_in_case.



4
5
6
# File 'lib/muffin_man/request_helpers/inbound_shipment_plan_request_item.rb', line 4

def quantity_in_case
  @quantity_in_case
end

#seller_skuObject (readonly)

Returns the value of attribute seller_sku.



4
5
6
# File 'lib/muffin_man/request_helpers/inbound_shipment_plan_request_item.rb', line 4

def seller_sku
  @seller_sku
end

Instance Method Details

#json_bodyObject



15
16
17
18
19
20
21
22
23
24
# File 'lib/muffin_man/request_helpers/inbound_shipment_plan_request_item.rb', line 15

def json_body
  {
    "SellerSKU": seller_sku,
    "ASIN": asin,
    "Condition": condition,
    "Quantity": quantity,
    "QuantityInCase": quantity_in_case,
    "PrepDetailsList": prep_details_list
  }
end