Class: MuffinMan::VendorDirectFulfillmentInventory::V1

Inherits:
SpApiClient
  • Object
show all
Defined in:
lib/muffin_man/vendor_direct_fulfillment_inventory/v1.rb

Constant Summary

Constants inherited from SpApiClient

SpApiClient::ACCESS_TOKEN_URL, SpApiClient::AWS_REGION_MAP, SpApiClient::SERVICE_NAME, SpApiClient::UNPROCESSABLE_ENTITY_STATUS_CODE

Instance Attribute Summary

Attributes inherited from SpApiClient

#access_token_cache_key, #aws_access_key_id, #aws_secret_access_key, #client_id, #client_secret, #config, #credentials, #local_var_path, #pii_data_elements, #query_params, #refresh_token, #region, #request_body, #request_type, #sandbox, #scope, #sts_iam_role_arn

Instance Method Summary collapse

Methods inherited from SpApiClient

#initialize

Constructor Details

This class inherits a constructor from MuffinMan::SpApiClient

Instance Method Details

#submit_inventory_update(warehouse_id, selling_party, is_full_update, items) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/muffin_man/vendor_direct_fulfillment_inventory/v1.rb', line 6

def submit_inventory_update(warehouse_id, selling_party, is_full_update, items)
  @local_var_path = "/vendor/directFulfillment/inventory/v1/warehouses/#{warehouse_id}/items"
  @request_body = {
    "inventory" => {
      "sellingParty" => selling_party,
      "isFullUpdate" => is_full_update,
      "items" => items
    }
  }
  @request_type = "POST"
  call_api
end