class Io::Flow::V0::Models::OrderServiceChangeForm

Manual change for a shipping method used for an order. Currently only available to orders with a single calculated delivery. To help with orders with multiple deliveries, we will require verification of both the current service level (from) and the new service level (to).

Attributes

from_service_id[R]
to_service_id[R]

Public Class Methods

new(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 54061
def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:from_service_id, :to_service_id], 'OrderServiceChangeForm')
  @from_service_id = HttpClient::Preconditions.assert_class('from_service_id', opts.delete(:from_service_id), String)
  @to_service_id = HttpClient::Preconditions.assert_class('to_service_id', opts.delete(:to_service_id), String)
end

Public Instance Methods

copy(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 54072
def copy(incoming={})
  OrderServiceChangeForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end
to_hash() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 54076
def to_hash
  {
    :from_service_id => from_service_id,
    :to_service_id => to_service_id
  }
end
to_json() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 54068
def to_json
  JSON.dump(to_hash)
end