createAsset
adds a fixed asset
Adds an asset to the system
/Assets
Usage and SDK Samples
xero_client.set_token_set(user.token_set)
xero_tenant_id = 'YOUR_XERO_TENANT_ID'
idempotency_key = 'KEY_VALUE'
asset = {
asset_name: "Other Computer",
asset_number: "FA-00210",
status: XeroRuby::Asset::AssetStatus::DRAFT
}
begin
response = xero_client.accounting_api.create_asset(xero_tenant_id, asset, idempotency_key)
return response
rescue XeroRuby::ApiError => e
puts "Exception when calling create_asset: #{e}"
end
Scopes
assets | Grant read-write access to fixed assets |
Parameters
Name | Description |
---|---|
xero-tenant-id* |
String
Xero identifier for Tenant
Required
|
Idempotency-Key |
String
This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
Name | Description |
---|---|
asset * |
Asset
Fixed asset you are creating
Required
|