class MyJohnDeereApi::Request::Update::Asset
Private Instance Methods
request_body()
click to toggle source
Request
body
# File lib/my_john_deere_api/request/update/asset.rb, line 20 def request_body return @body if defined?(@body) validate_contribution_definition @body = { title: attributes[:title], assetCategory: attributes[:asset_category], assetType: attributes[:asset_type], assetSubType: attributes[:asset_sub_type], links: [ { '@type' => 'Link', 'rel' => 'contributionDefinition', 'uri' => client.contribution_definition_uri, } ] } end
resource()
click to toggle source
Path supplied to API
# File lib/my_john_deere_api/request/update/asset.rb, line 13 def resource @resource ||= "/platform/assets/#{attributes[:id]}" end