Skip to content

Latest commit

 

History

History
269 lines (170 loc) · 13.5 KB

README.md

File metadata and controls

269 lines (170 loc) · 13.5 KB

Inventory

(inventory)

Overview

Available Operations

create_commerce_inventory

Create an inventory

Example Usage

require 'unified_ruby_sdk'


s = ::UnifiedRubySDK::UnifiedTo.new
s.config_security(
  ::UnifiedRubySDK::Shared::Security.new(
    jwt: "<YOUR_API_KEY_HERE>",
  )
)

    
res = s.inventory.create_commerce_inventory(connection_id="<id>", commerce_inventory=::UnifiedRubySDK::Shared::CommerceInventory.new(
  available: 5165.08,
), fields_=[
  "<value>",
])

if ! res.commerce_inventory.nil?
  # handle response
end

Parameters

Parameter Type Required Description
connection_id ::String ✔️ ID of the connection
commerce_inventory T.nilable(::UnifiedRubySDK::Shared::CommerceInventory) N/A
fields_ T::Array<::String> Comma-delimited fields to return

Response

T.nilable(::UnifiedRubySDK::Operations::CreateCommerceInventoryResponse)

get_commerce_inventory

Retrieve an inventory

Example Usage

require 'unified_ruby_sdk'


s = ::UnifiedRubySDK::UnifiedTo.new
s.config_security(
  ::UnifiedRubySDK::Shared::Security.new(
    jwt: "<YOUR_API_KEY_HERE>",
  )
)

    
res = s.inventory.get_commerce_inventory(connection_id="<id>", id="<id>", fields_=[
  "<value>",
])

if ! res.commerce_inventory.nil?
  # handle response
end

Parameters

Parameter Type Required Description
connection_id ::String ✔️ ID of the connection
id ::String ✔️ ID of the Inventory
fields_ T::Array<::String> Comma-delimited fields to return

Response

T.nilable(::UnifiedRubySDK::Operations::GetCommerceInventoryResponse)

list_commerce_inventories

List all inventories

Example Usage

require 'unified_ruby_sdk'


s = ::UnifiedRubySDK::UnifiedTo.new
s.config_security(
  ::UnifiedRubySDK::Shared::Security.new(
    jwt: "<YOUR_API_KEY_HERE>",
  )
)


req = ::UnifiedRubySDK::Operations::ListCommerceInventoriesRequest.new(
  connection_id: "<id>",
)
    
res = s.inventory.list_commerce_inventories(req)

if ! res.commerce_inventories.nil?
  # handle response
end

Parameters

Parameter Type Required Description
request ::UnifiedRubySDK::Operations::ListCommerceInventoriesRequest ✔️ The request object to use for the request.

Response

T.nilable(::UnifiedRubySDK::Operations::ListCommerceInventoriesResponse)

patch_commerce_inventory

Update an inventory

Example Usage

require 'unified_ruby_sdk'


s = ::UnifiedRubySDK::UnifiedTo.new
s.config_security(
  ::UnifiedRubySDK::Shared::Security.new(
    jwt: "<YOUR_API_KEY_HERE>",
  )
)

    
res = s.inventory.patch_commerce_inventory(connection_id="<id>", id="<id>", commerce_inventory=::UnifiedRubySDK::Shared::CommerceInventory.new(
  available: 615.23,
), fields_=[
  "<value>",
])

if ! res.commerce_inventory.nil?
  # handle response
end

Parameters

Parameter Type Required Description
connection_id ::String ✔️ ID of the connection
id ::String ✔️ ID of the Inventory
commerce_inventory T.nilable(::UnifiedRubySDK::Shared::CommerceInventory) N/A
fields_ T::Array<::String> Comma-delimited fields to return

Response

T.nilable(::UnifiedRubySDK::Operations::PatchCommerceInventoryResponse)

remove_commerce_inventory

Remove an inventory

Example Usage

require 'unified_ruby_sdk'


s = ::UnifiedRubySDK::UnifiedTo.new
s.config_security(
  ::UnifiedRubySDK::Shared::Security.new(
    jwt: "<YOUR_API_KEY_HERE>",
  )
)

    
res = s.inventory.remove_commerce_inventory(connection_id="<id>", id="<id>")

if res.status_code == 200
  # handle response
end

Parameters

Parameter Type Required Description
connection_id ::String ✔️ ID of the connection
id ::String ✔️ ID of the Inventory

Response

T.nilable(::UnifiedRubySDK::Operations::RemoveCommerceInventoryResponse)

update_commerce_inventory

Update an inventory

Example Usage

require 'unified_ruby_sdk'


s = ::UnifiedRubySDK::UnifiedTo.new
s.config_security(
  ::UnifiedRubySDK::Shared::Security.new(
    jwt: "<YOUR_API_KEY_HERE>",
  )
)

    
res = s.inventory.update_commerce_inventory(connection_id="<id>", id="<id>", commerce_inventory=::UnifiedRubySDK::Shared::CommerceInventory.new(
  available: 9360.02,
), fields_=[
  "<value>",
])

if ! res.commerce_inventory.nil?
  # handle response
end

Parameters

Parameter Type Required Description
connection_id ::String ✔️ ID of the connection
id ::String ✔️ ID of the Inventory
commerce_inventory T.nilable(::UnifiedRubySDK::Shared::CommerceInventory) N/A
fields_ T::Array<::String> Comma-delimited fields to return

Response

T.nilable(::UnifiedRubySDK::Operations::UpdateCommerceInventoryResponse)