vendors_api = client.vendors
VendorsApi
- Bulk Create Vendors
- Bulk Retrieve Vendors
- Bulk Update Vendors
- Create Vendor
- Search Vendors
- Retrieve Vendor
- Update Vendor
Creates one or more Vendor objects to represent suppliers to a seller.
def bulk_create_vendors(body:)
Parameter | Type | Tags | Description |
---|---|---|---|
body |
Bulk Create Vendors Request Hash |
Body, Required | An object containing the fields to POST for the request. See the corresponding object definition for field details. |
Bulk Create Vendors Response Hash
body = {}
body[:vendors] = {}
result = vendors_api.bulk_create_vendors(body: body)
if result.success?
puts result.data
elsif result.error?
warn result.errors
end
Retrieves one or more vendors of specified Vendor IDs.
def bulk_retrieve_vendors(body:)
Parameter | Type | Tags | Description |
---|---|---|---|
body |
Bulk Retrieve Vendors Request Hash |
Body, Required | An object containing the fields to POST for the request. See the corresponding object definition for field details. |
Bulk Retrieve Vendors Response Hash
body = {}
body[:vendor_ids] = ['INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4']
result = vendors_api.bulk_retrieve_vendors(body: body)
if result.success?
puts result.data
elsif result.error?
warn result.errors
end
Updates one or more of existing Vendor objects as suppliers to a seller.
def bulk_update_vendors(body:)
Parameter | Type | Tags | Description |
---|---|---|---|
body |
Bulk Update Vendors Request Hash |
Body, Required | An object containing the fields to POST for the request. See the corresponding object definition for field details. |
Bulk Update Vendors Response Hash
body = {}
body[:vendors] = {}
body[:vendors][:vendor] = {}
result = vendors_api.bulk_update_vendors(body: body)
if result.success?
puts result.data
elsif result.error?
warn result.errors
end
Creates a single Vendor object to represent a supplier to a seller.
def create_vendor(body:)
Parameter | Type | Tags | Description |
---|---|---|---|
body |
Create Vendor Request Hash |
Body, Required | An object containing the fields to POST for the request. See the corresponding object definition for field details. |
body = {}
body[:idempotency_key] = 'idempotency_key2'
result = vendors_api.create_vendor(body: body)
if result.success?
puts result.data
elsif result.error?
warn result.errors
end
Searches for vendors using a filter against supported Vendor properties and a supported sorter.
def search_vendors(body:)
Parameter | Type | Tags | Description |
---|---|---|---|
body |
Search Vendors Request Hash |
Body, Required | An object containing the fields to POST for the request. See the corresponding object definition for field details. |
body = {}
result = vendors_api.search_vendors(body: body)
if result.success?
puts result.data
elsif result.error?
warn result.errors
end
Retrieves the vendor of a specified Vendor ID.
def retrieve_vendor(vendor_id:)
Parameter | Type | Tags | Description |
---|---|---|---|
vendor_id |
String |
Template, Required | ID of the Vendor to retrieve. |
vendor_id = 'vendor_id8'
result = vendors_api.retrieve_vendor(vendor_id: vendor_id)
if result.success?
puts result.data
elsif result.error?
warn result.errors
end
Updates an existing Vendor object as a supplier to a seller.
def update_vendor(body:,
vendor_id:)
Parameter | Type | Tags | Description |
---|---|---|---|
body |
Update Vendor Request Hash |
Body, Required | An object containing the fields to POST for the request. See the corresponding object definition for field details. |
vendor_id |
String |
Template, Required | - |
body = {}
body[:idempotency_key] = '8fc6a5b0-9fe8-4b46-b46b-2ef95793abbe'
body[:vendor] = {}
body[:vendor][:id] = 'INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4'
body[:vendor][:name] = 'Jack\'s Chicken Shack'
body[:vendor][:version] = 1
body[:vendor][:status] = 'ACTIVE'
vendor_id = 'vendor_id8'
result = vendors_api.update_vendor(body: body, vendor_id: vendor_id)
if result.success?
puts result.data
elsif result.error?
warn result.errors
end