Class: Io::Flow::V0::Clients::DutyItemApprovals
- Inherits:
-
Object
- Object
- Io::Flow::V0::Clients::DutyItemApprovals
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Method Summary collapse
-
#initialize(client) ⇒ DutyItemApprovals
constructor
A new instance of DutyItemApprovals.
- #put_by_number(organization, number, duty_item_approval_form) ⇒ Object
Constructor Details
#initialize(client) ⇒ DutyItemApprovals
Returns a new instance of DutyItemApprovals.
6694 6695 6696 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6694 def initialize(client) @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client) end |
Instance Method Details
#put_by_number(organization, number, duty_item_approval_form) ⇒ Object
6698 6699 6700 6701 6702 6703 6704 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 6698 def put_by_number(organization, number, duty_item_approval_form) HttpClient::Preconditions.assert_class('organization', organization, String) HttpClient::Preconditions.assert_class('number', number, String) (x = duty_item_approval_form; x.is_a?(::Io::Flow::V0::Models::DutyItemApprovalForm) ? x : ::Io::Flow::V0::Models::DutyItemApprovalForm.new(x)) r = @client.request("/#{CGI.escape(organization)}/duty/item/approval/#{CGI.escape(number)}").with_json(duty_item_approval_form.to_json).put ::Io::Flow::V0::Models::DutyItem.new(r) end |