flowcommerce 0.1.15 → 0.1.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/flow_commerce/flow_api_v0_client.rb +908 -230
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 095c670a513ef1cb91398a8be4b78178b5934f89
|
4
|
+
data.tar.gz: e294e2bfcb6d58a75305d634de2f41f8de5b36f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38d861aa193287b28186fa34f61cfd81655f92e79fbde1d219c110ceafc7e05670fc1a78b800ff90544cb9eadc313cd078e89ade66a01153df4d6b127bf815a0
|
7
|
+
data.tar.gz: 48cda4e6c64288c8cf065360fa6015746a5a221cf38e69252ce6f3eccb237f58def6c6dbba43264070b0f65f19fa7f563924c6060fd0fb5f97681fbc1e577418
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# Generated by apidoc - http://www.apidoc.me
|
2
|
-
# Service version: 0.2.
|
3
|
-
# apidoc:0.11.
|
2
|
+
# Service version: 0.2.65
|
3
|
+
# apidoc:0.11.71 http://www.apidoc.me/flow/api/0.2.65/ruby_client
|
4
4
|
|
5
5
|
require 'cgi'
|
6
6
|
require 'net/http'
|
@@ -25,8 +25,8 @@ module Io
|
|
25
25
|
|
26
26
|
BASE_URL = 'https://api.flow.io' unless defined?(Constants::BASE_URL)
|
27
27
|
NAMESPACE = 'io.flow.v0' unless defined?(Constants::NAMESPACE)
|
28
|
-
USER_AGENT = 'apidoc:0.11.
|
29
|
-
VERSION = '0.2.
|
28
|
+
USER_AGENT = 'apidoc:0.11.71 http://www.apidoc.me/flow/api/0.2.65/ruby_client' unless defined?(Constants::USER_AGENT)
|
29
|
+
VERSION = '0.2.65' unless defined?(Constants::VERSION)
|
30
30
|
VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
|
31
31
|
|
32
32
|
end
|
@@ -209,10 +209,6 @@ module Io
|
|
209
209
|
@quotes ||= ::Io::Flow::V0::Clients::Quotes.new(self)
|
210
210
|
end
|
211
211
|
|
212
|
-
def rmas
|
213
|
-
@rmas ||= ::Io::Flow::V0::Clients::Rmas.new(self)
|
214
|
-
end
|
215
|
-
|
216
212
|
def shipping_labels
|
217
213
|
@shipping_labels ||= ::Io::Flow::V0::Clients::ShippingLabels.new(self)
|
218
214
|
end
|
@@ -325,6 +321,14 @@ module Io
|
|
325
321
|
@password_reset_forms ||= ::Io::Flow::V0::Clients::PasswordResetForms.new(self)
|
326
322
|
end
|
327
323
|
|
324
|
+
def returns
|
325
|
+
@returns ||= ::Io::Flow::V0::Clients::Returns.new(self)
|
326
|
+
end
|
327
|
+
|
328
|
+
def scheduled_exports
|
329
|
+
@scheduled_exports ||= ::Io::Flow::V0::Clients::ScheduledExports.new(self)
|
330
|
+
end
|
331
|
+
|
328
332
|
def suggestions
|
329
333
|
@suggestions ||= ::Io::Flow::V0::Clients::Suggestions.new(self)
|
330
334
|
end
|
@@ -515,6 +519,7 @@ module Io
|
|
515
519
|
:region => (x = opts.delete(:region); x.nil? ? nil : HttpClient::Preconditions.assert_class('region', x, String)),
|
516
520
|
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
|
517
521
|
:subcatalog => (x = opts.delete(:subcatalog); x.nil? ? nil : HttpClient::Preconditions.assert_class('subcatalog', x, String)),
|
522
|
+
:ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
|
518
523
|
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
519
524
|
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
520
525
|
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "name" : x), String)
|
@@ -2045,6 +2050,7 @@ module Io
|
|
2045
2050
|
query = {
|
2046
2051
|
:id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
|
2047
2052
|
:key => (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, Array).map { |v| HttpClient::Preconditions.assert_class('key', v, String) }),
|
2053
|
+
:order_number => (x = opts.delete(:order_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('order_number', x, String)),
|
2048
2054
|
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
2049
2055
|
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
2050
2056
|
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String)
|
@@ -2584,60 +2590,6 @@ module Io
|
|
2584
2590
|
|
2585
2591
|
end
|
2586
2592
|
|
2587
|
-
class Rmas
|
2588
|
-
|
2589
|
-
def initialize(client)
|
2590
|
-
@client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
|
2591
|
-
end
|
2592
|
-
|
2593
|
-
def get(organization, incoming={})
|
2594
|
-
HttpClient::Preconditions.assert_class('organization', organization, String)
|
2595
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
2596
|
-
query = {
|
2597
|
-
:id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
|
2598
|
-
:number => (x = opts.delete(:number); x.nil? ? nil : HttpClient::Preconditions.assert_class('number', x, Array).map { |v| HttpClient::Preconditions.assert_class('number', v, String) }),
|
2599
|
-
:carrier_tracking_number => (x = opts.delete(:carrier_tracking_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('carrier_tracking_number', x, Array).map { |v| HttpClient::Preconditions.assert_class('carrier_tracking_number', v, String) }),
|
2600
|
-
:flow_tracking_number => (x = opts.delete(:flow_tracking_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('flow_tracking_number', x, Array).map { |v| HttpClient::Preconditions.assert_class('flow_tracking_number', v, String) }),
|
2601
|
-
:order_number => (x = opts.delete(:order_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('order_number', x, Array).map { |v| HttpClient::Preconditions.assert_class('order_number', v, String) }),
|
2602
|
-
:service => (x = opts.delete(:service); x.nil? ? nil : HttpClient::Preconditions.assert_class('service', x, Array).map { |v| HttpClient::Preconditions.assert_class('service', v, String) }),
|
2603
|
-
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
2604
|
-
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
2605
|
-
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String)
|
2606
|
-
}.delete_if { |k, v| v.nil? }
|
2607
|
-
r = @client.request("/#{CGI.escape(organization)}/rmas").with_query(query).get
|
2608
|
-
r.map { |x| ::Io::Flow::V0::Models::Rma.new(x) }
|
2609
|
-
end
|
2610
|
-
|
2611
|
-
def post(organization, rma_form)
|
2612
|
-
HttpClient::Preconditions.assert_class('organization', organization, String)
|
2613
|
-
HttpClient::Preconditions.assert_class('rma_form', rma_form, ::Io::Flow::V0::Models::RmaForm)
|
2614
|
-
r = @client.request("/#{CGI.escape(organization)}/rmas").with_json(rma_form.to_json).post
|
2615
|
-
::Io::Flow::V0::Models::Rma.new(r)
|
2616
|
-
end
|
2617
|
-
|
2618
|
-
def get_by_id(organization, id)
|
2619
|
-
HttpClient::Preconditions.assert_class('organization', organization, String)
|
2620
|
-
HttpClient::Preconditions.assert_class('id', id, String)
|
2621
|
-
r = @client.request("/#{CGI.escape(organization)}/rmas/#{CGI.escape(id)}").get
|
2622
|
-
::Io::Flow::V0::Models::Rma.new(r)
|
2623
|
-
end
|
2624
|
-
|
2625
|
-
def get_versions(organization, incoming={})
|
2626
|
-
HttpClient::Preconditions.assert_class('organization', organization, String)
|
2627
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
2628
|
-
query = {
|
2629
|
-
:id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
|
2630
|
-
:number => (x = opts.delete(:number); x.nil? ? nil : HttpClient::Preconditions.assert_class('number', x, Array).map { |v| HttpClient::Preconditions.assert_class('number', v, String) }),
|
2631
|
-
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
2632
|
-
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
2633
|
-
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
|
2634
|
-
}.delete_if { |k, v| v.nil? }
|
2635
|
-
r = @client.request("/#{CGI.escape(organization)}/rmas/versions").with_query(query).get
|
2636
|
-
r.map { |x| ::Io::Flow::V0::Models::RmaVersion.new(x) }
|
2637
|
-
end
|
2638
|
-
|
2639
|
-
end
|
2640
|
-
|
2641
2593
|
class ShippingLabels
|
2642
2594
|
|
2643
2595
|
def initialize(client)
|
@@ -3804,6 +3756,124 @@ module Io
|
|
3804
3756
|
|
3805
3757
|
end
|
3806
3758
|
|
3759
|
+
class Returns
|
3760
|
+
|
3761
|
+
def initialize(client)
|
3762
|
+
@client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
|
3763
|
+
end
|
3764
|
+
|
3765
|
+
def get(organization, incoming={})
|
3766
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
3767
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
3768
|
+
query = {
|
3769
|
+
:id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
|
3770
|
+
:key => (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, Array).map { |v| HttpClient::Preconditions.assert_class('key', v, String) }),
|
3771
|
+
:order_number => (x = opts.delete(:order_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('order_number', x, Array).map { |v| HttpClient::Preconditions.assert_class('order_number', v, String) }),
|
3772
|
+
:flow_tracking_number => (x = opts.delete(:flow_tracking_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('flow_tracking_number', x, Array).map { |v| HttpClient::Preconditions.assert_class('flow_tracking_number', v, String) }),
|
3773
|
+
:carrier_tracking_number => (x = opts.delete(:carrier_tracking_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('carrier_tracking_number', x, Array).map { |v| HttpClient::Preconditions.assert_class('carrier_tracking_number', v, String) }),
|
3774
|
+
:service => (x = opts.delete(:service); x.nil? ? nil : HttpClient::Preconditions.assert_class('service', x, Array).map { |v| HttpClient::Preconditions.assert_class('service', v, String) }),
|
3775
|
+
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
3776
|
+
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
3777
|
+
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String)
|
3778
|
+
}.delete_if { |k, v| v.nil? }
|
3779
|
+
r = @client.request("/#{CGI.escape(organization)}/returns").with_query(query).get
|
3780
|
+
r.map { |x| ::Io::Flow::V0::Models::Return.new(x) }
|
3781
|
+
end
|
3782
|
+
|
3783
|
+
def post(organization, return_form)
|
3784
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
3785
|
+
HttpClient::Preconditions.assert_class('return_form', return_form, ::Io::Flow::V0::Models::ReturnForm)
|
3786
|
+
r = @client.request("/#{CGI.escape(organization)}/returns").with_json(return_form.to_json).post
|
3787
|
+
::Io::Flow::V0::Models::Return.new(r)
|
3788
|
+
end
|
3789
|
+
|
3790
|
+
def get_by_key(organization, key)
|
3791
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
3792
|
+
HttpClient::Preconditions.assert_class('key', key, String)
|
3793
|
+
r = @client.request("/#{CGI.escape(organization)}/returns/#{CGI.escape(key)}").get
|
3794
|
+
::Io::Flow::V0::Models::Return.new(r)
|
3795
|
+
end
|
3796
|
+
|
3797
|
+
def put_by_key(organization, key, return_form)
|
3798
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
3799
|
+
HttpClient::Preconditions.assert_class('key', key, String)
|
3800
|
+
HttpClient::Preconditions.assert_class('return_form', return_form, ::Io::Flow::V0::Models::ReturnForm)
|
3801
|
+
r = @client.request("/#{CGI.escape(organization)}/returns/#{CGI.escape(key)}").with_json(return_form.to_json).put
|
3802
|
+
::Io::Flow::V0::Models::Return.new(r)
|
3803
|
+
end
|
3804
|
+
|
3805
|
+
def delete_by_key(organization, key)
|
3806
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
3807
|
+
HttpClient::Preconditions.assert_class('key', key, String)
|
3808
|
+
r = @client.request("/#{CGI.escape(organization)}/returns/#{CGI.escape(key)}").delete
|
3809
|
+
nil
|
3810
|
+
end
|
3811
|
+
|
3812
|
+
def get_versions(organization, incoming={})
|
3813
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
3814
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
3815
|
+
query = {
|
3816
|
+
:id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
|
3817
|
+
:key => (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, Array).map { |v| HttpClient::Preconditions.assert_class('key', v, String) }),
|
3818
|
+
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
3819
|
+
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
3820
|
+
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
|
3821
|
+
}.delete_if { |k, v| v.nil? }
|
3822
|
+
r = @client.request("/#{CGI.escape(organization)}/returns/versions").with_query(query).get
|
3823
|
+
r.map { |x| ::Io::Flow::V0::Models::ReturnVersion.new(x) }
|
3824
|
+
end
|
3825
|
+
|
3826
|
+
end
|
3827
|
+
|
3828
|
+
class ScheduledExports
|
3829
|
+
|
3830
|
+
def initialize(client)
|
3831
|
+
@client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
|
3832
|
+
end
|
3833
|
+
|
3834
|
+
# Search scheduled exports. Always paginated.
|
3835
|
+
def get(incoming={})
|
3836
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
3837
|
+
query = {
|
3838
|
+
:id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
|
3839
|
+
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
3840
|
+
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
3841
|
+
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String)
|
3842
|
+
}.delete_if { |k, v| v.nil? }
|
3843
|
+
r = @client.request("/users/scheduled/exports").with_query(query).get
|
3844
|
+
r.map { |x| ::Io::Flow::V0::Models::ScheduledExport.new(x) }
|
3845
|
+
end
|
3846
|
+
|
3847
|
+
# Create a scheduled export.
|
3848
|
+
def post(scheduled_export_form)
|
3849
|
+
HttpClient::Preconditions.assert_class('scheduled_export_form', scheduled_export_form, ::Io::Flow::V0::Models::ScheduledExportForm)
|
3850
|
+
r = @client.request("/users/scheduled/exports").with_json(scheduled_export_form.to_json).post
|
3851
|
+
::Io::Flow::V0::Models::ScheduledExport.new(r)
|
3852
|
+
end
|
3853
|
+
|
3854
|
+
# Get a single excheduled export.
|
3855
|
+
def get_by_id(id)
|
3856
|
+
HttpClient::Preconditions.assert_class('id', id, String)
|
3857
|
+
r = @client.request("/users/scheduled/exports/#{CGI.escape(id)}").get
|
3858
|
+
::Io::Flow::V0::Models::ScheduledExport.new(r)
|
3859
|
+
end
|
3860
|
+
|
3861
|
+
# Update a scheduled export.
|
3862
|
+
def put_by_id(id, scheduled_export_form)
|
3863
|
+
HttpClient::Preconditions.assert_class('id', id, String)
|
3864
|
+
HttpClient::Preconditions.assert_class('scheduled_export_form', scheduled_export_form, ::Io::Flow::V0::Models::ScheduledExportForm)
|
3865
|
+
r = @client.request("/users/scheduled/exports/#{CGI.escape(id)}").with_json(scheduled_export_form.to_json).put
|
3866
|
+
::Io::Flow::V0::Models::ScheduledExport.new(r)
|
3867
|
+
end
|
3868
|
+
|
3869
|
+
def delete_by_id(id)
|
3870
|
+
HttpClient::Preconditions.assert_class('id', id, String)
|
3871
|
+
r = @client.request("/users/scheduled/exports/#{CGI.escape(id)}").delete
|
3872
|
+
nil
|
3873
|
+
end
|
3874
|
+
|
3875
|
+
end
|
3876
|
+
|
3807
3877
|
class Suggestions
|
3808
3878
|
|
3809
3879
|
def initialize(client)
|
@@ -4254,6 +4324,8 @@ module Io
|
|
4254
4324
|
LOCALIZED_ITEM_UPSERTED = 'localized_item_upserted' unless defined?(LOCALIZED_ITEM_UPSERTED)
|
4255
4325
|
LOCALIZED_ITEM_DELETED = 'localized_item_deleted' unless defined?(LOCALIZED_ITEM_DELETED)
|
4256
4326
|
LOCALIZED_ITEM_SNAPSHOT = 'localized_item_snapshot' unless defined?(LOCALIZED_ITEM_SNAPSHOT)
|
4327
|
+
MEMBERSHIP_UPSERTED = 'membership_upserted' unless defined?(MEMBERSHIP_UPSERTED)
|
4328
|
+
MEMBERSHIP_DELETED = 'membership_deleted' unless defined?(MEMBERSHIP_DELETED)
|
4257
4329
|
ORGANIZATION_UPSERTED = 'organization_upserted' unless defined?(ORGANIZATION_UPSERTED)
|
4258
4330
|
ORGANIZATION_DELETED = 'organization_deleted' unless defined?(ORGANIZATION_DELETED)
|
4259
4331
|
AUTHORIZATION_UPSERTED = 'authorization_upserted' unless defined?(AUTHORIZATION_UPSERTED)
|
@@ -4276,7 +4348,7 @@ module Io
|
|
4276
4348
|
end
|
4277
4349
|
|
4278
4350
|
def subtype_to_hash
|
4279
|
-
raise 'Cannot serialize an instance of event directly - must use one of the specific types: catalog_upserted, catalog_deleted, subcatalog_upserted, subcatalog_deleted, catalog_item_upserted, catalog_item_deleted, subcatalog_item_upserted, subcatalog_item_deleted, rate_deleted, rate_upserted, experience_deleted, experience_upserted, item_margin_deleted, item_margin_upserted, label_format_deleted, label_format_upserted, order_deleted, order_upserted, order_identifier_deleted, order_identifier_upserted, pricing_deleted, pricing_upserted, hs6_code_upserted, hs6_code_deleted, hs10_code_upserted, hs10_code_deleted, item_origin_upserted, item_origin_deleted, harmonized_item_upserted, harmonized_item_deleted, snapshot_upserted, snapshot_deleted, label_upserted, notification_upserted, notification_deleted, rma_upserted, rma_deleted, localized_item_upserted, localized_item_deleted, localized_item_snapshot, organization_upserted, organization_deleted, authorization_upserted, authorization_deleted, capture_upserted, card_upserted, card_deleted, refund_upserted, targeting_item_upserted, targeting_item_deleted, tracking_label_event_upserted'
|
4351
|
+
raise 'Cannot serialize an instance of event directly - must use one of the specific types: catalog_upserted, catalog_deleted, subcatalog_upserted, subcatalog_deleted, catalog_item_upserted, catalog_item_deleted, subcatalog_item_upserted, subcatalog_item_deleted, rate_deleted, rate_upserted, experience_deleted, experience_upserted, item_margin_deleted, item_margin_upserted, label_format_deleted, label_format_upserted, order_deleted, order_upserted, order_identifier_deleted, order_identifier_upserted, pricing_deleted, pricing_upserted, hs6_code_upserted, hs6_code_deleted, hs10_code_upserted, hs10_code_deleted, item_origin_upserted, item_origin_deleted, harmonized_item_upserted, harmonized_item_deleted, snapshot_upserted, snapshot_deleted, label_upserted, notification_upserted, notification_deleted, rma_upserted, rma_deleted, localized_item_upserted, localized_item_deleted, localized_item_snapshot, membership_upserted, membership_deleted, organization_upserted, organization_deleted, authorization_upserted, authorization_deleted, capture_upserted, card_upserted, card_deleted, refund_upserted, targeting_item_upserted, targeting_item_deleted, tracking_label_event_upserted'
|
4280
4352
|
end
|
4281
4353
|
|
4282
4354
|
def to_hash
|
@@ -4330,6 +4402,8 @@ module Io
|
|
4330
4402
|
when Types::LOCALIZED_ITEM_UPSERTED; LocalizedItemUpserted.new(hash)
|
4331
4403
|
when Types::LOCALIZED_ITEM_DELETED; LocalizedItemDeleted.new(hash)
|
4332
4404
|
when Types::LOCALIZED_ITEM_SNAPSHOT; LocalizedItemSnapshot.new(hash)
|
4405
|
+
when Types::MEMBERSHIP_UPSERTED; MembershipUpserted.new(hash)
|
4406
|
+
when Types::MEMBERSHIP_DELETED; MembershipDeleted.new(hash)
|
4333
4407
|
when Types::ORGANIZATION_UPSERTED; OrganizationUpserted.new(hash)
|
4334
4408
|
when Types::ORGANIZATION_DELETED; OrganizationDeleted.new(hash)
|
4335
4409
|
when Types::AUTHORIZATION_UPSERTED; AuthorizationUpserted.new(hash)
|
@@ -4690,12 +4764,13 @@ module Io
|
|
4690
4764
|
class ExportType
|
4691
4765
|
|
4692
4766
|
module Types
|
4767
|
+
ACCOUNT_TRANSACTIONS_EXPORT_TYPE = 'account_transactions_export_type' unless defined?(ACCOUNT_TRANSACTIONS_EXPORT_TYPE)
|
4768
|
+
ACCOUNT_ORDERS_EXPORT_TYPE = 'account_orders_export_type' unless defined?(ACCOUNT_ORDERS_EXPORT_TYPE)
|
4693
4769
|
CATALOG_ITEM_EXPORT_TYPE = 'catalog_item_export_type' unless defined?(CATALOG_ITEM_EXPORT_TYPE)
|
4694
4770
|
HARMONIZATION_OVERVIEW_EXPORT_TYPE = 'harmonization_overview_export_type' unless defined?(HARMONIZATION_OVERVIEW_EXPORT_TYPE)
|
4695
4771
|
HARMONIZATION_HS6_EXPORT_TYPE = 'harmonization_hs6_export_type' unless defined?(HARMONIZATION_HS6_EXPORT_TYPE)
|
4696
4772
|
HARMONIZATION_HS10_EXPORT_TYPE = 'harmonization_hs10_export_type' unless defined?(HARMONIZATION_HS10_EXPORT_TYPE)
|
4697
|
-
|
4698
|
-
ACCOUNT_ORDERS_EXPORT_TYPE = 'account_orders_export_type' unless defined?(ACCOUNT_ORDERS_EXPORT_TYPE)
|
4773
|
+
ORDER_EXPORT_TYPE = 'order_export_type' unless defined?(ORDER_EXPORT_TYPE)
|
4699
4774
|
SOLIDUS_PRODUCT_EXPORT_TYPE = 'solidus_product_export_type' unless defined?(SOLIDUS_PRODUCT_EXPORT_TYPE)
|
4700
4775
|
SOLIDUS_VARIANT_EXPORT_TYPE = 'solidus_variant_export_type' unless defined?(SOLIDUS_VARIANT_EXPORT_TYPE)
|
4701
4776
|
end
|
@@ -4709,7 +4784,7 @@ module Io
|
|
4709
4784
|
end
|
4710
4785
|
|
4711
4786
|
def subtype_to_hash
|
4712
|
-
raise 'Cannot serialize an instance of export_type directly - must use one of the specific types: catalog_item_export_type, harmonization_overview_export_type, harmonization_hs6_export_type, harmonization_hs10_export_type,
|
4787
|
+
raise 'Cannot serialize an instance of export_type directly - must use one of the specific types: account_transactions_export_type, account_orders_export_type, catalog_item_export_type, harmonization_overview_export_type, harmonization_hs6_export_type, harmonization_hs10_export_type, order_export_type, solidus_product_export_type, solidus_variant_export_type'
|
4713
4788
|
end
|
4714
4789
|
|
4715
4790
|
def to_hash
|
@@ -4723,12 +4798,13 @@ module Io
|
|
4723
4798
|
raise "Union type[export_type] requires a field named 'discriminator'"
|
4724
4799
|
end
|
4725
4800
|
case discriminator
|
4801
|
+
when Types::ACCOUNT_TRANSACTIONS_EXPORT_TYPE; AccountTransactionsExportType.new(hash)
|
4802
|
+
when Types::ACCOUNT_ORDERS_EXPORT_TYPE; AccountOrdersExportType.new(hash)
|
4726
4803
|
when Types::CATALOG_ITEM_EXPORT_TYPE; CatalogItemExportType.new(hash)
|
4727
4804
|
when Types::HARMONIZATION_OVERVIEW_EXPORT_TYPE; HarmonizationOverviewExportType.new(hash)
|
4728
4805
|
when Types::HARMONIZATION_HS6_EXPORT_TYPE; HarmonizationHs6ExportType.new(hash)
|
4729
4806
|
when Types::HARMONIZATION_HS10_EXPORT_TYPE; HarmonizationHs10ExportType.new(hash)
|
4730
|
-
when Types::
|
4731
|
-
when Types::ACCOUNT_ORDERS_EXPORT_TYPE; AccountOrdersExportType.new(hash)
|
4807
|
+
when Types::ORDER_EXPORT_TYPE; OrderExportType.new(hash)
|
4732
4808
|
when Types::SOLIDUS_PRODUCT_EXPORT_TYPE; SolidusProductExportType.new(hash)
|
4733
4809
|
when Types::SOLIDUS_VARIANT_EXPORT_TYPE; SolidusVariantExportType.new(hash)
|
4734
4810
|
else ExportTypeUndefinedType.new(:discriminator => discriminator)
|
@@ -5840,6 +5916,68 @@ module Io
|
|
5840
5916
|
|
5841
5917
|
end
|
5842
5918
|
|
5919
|
+
class DayOfWeek
|
5920
|
+
|
5921
|
+
attr_reader :value
|
5922
|
+
|
5923
|
+
def initialize(value)
|
5924
|
+
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
5925
|
+
end
|
5926
|
+
|
5927
|
+
# Returns the instance of DayOfWeek for this value, creating a new instance for an unknown value
|
5928
|
+
def DayOfWeek.apply(value)
|
5929
|
+
if value.instance_of?(DayOfWeek)
|
5930
|
+
value
|
5931
|
+
else
|
5932
|
+
HttpClient::Preconditions.assert_class_or_nil('value', value, String)
|
5933
|
+
value.nil? ? nil : (from_string(value) || DayOfWeek.new(value))
|
5934
|
+
end
|
5935
|
+
end
|
5936
|
+
|
5937
|
+
# Returns the instance of DayOfWeek for this value, or nil if not found
|
5938
|
+
def DayOfWeek.from_string(value)
|
5939
|
+
HttpClient::Preconditions.assert_class('value', value, String)
|
5940
|
+
DayOfWeek.ALL.find { |v| v.value == value }
|
5941
|
+
end
|
5942
|
+
|
5943
|
+
def DayOfWeek.ALL
|
5944
|
+
@@all ||= [DayOfWeek.sunday, DayOfWeek.monday, DayOfWeek.tuesday, DayOfWeek.wednesday, DayOfWeek.thursday, DayOfWeek.friday, DayOfWeek.saturday]
|
5945
|
+
end
|
5946
|
+
|
5947
|
+
def DayOfWeek.sunday
|
5948
|
+
@@_sunday ||= DayOfWeek.new('sunday')
|
5949
|
+
end
|
5950
|
+
|
5951
|
+
def DayOfWeek.monday
|
5952
|
+
@@_monday ||= DayOfWeek.new('monday')
|
5953
|
+
end
|
5954
|
+
|
5955
|
+
def DayOfWeek.tuesday
|
5956
|
+
@@_tuesday ||= DayOfWeek.new('tuesday')
|
5957
|
+
end
|
5958
|
+
|
5959
|
+
def DayOfWeek.wednesday
|
5960
|
+
@@_wednesday ||= DayOfWeek.new('wednesday')
|
5961
|
+
end
|
5962
|
+
|
5963
|
+
def DayOfWeek.thursday
|
5964
|
+
@@_thursday ||= DayOfWeek.new('thursday')
|
5965
|
+
end
|
5966
|
+
|
5967
|
+
def DayOfWeek.friday
|
5968
|
+
@@_friday ||= DayOfWeek.new('friday')
|
5969
|
+
end
|
5970
|
+
|
5971
|
+
def DayOfWeek.saturday
|
5972
|
+
@@_saturday ||= DayOfWeek.new('saturday')
|
5973
|
+
end
|
5974
|
+
|
5975
|
+
def to_hash
|
5976
|
+
value
|
5977
|
+
end
|
5978
|
+
|
5979
|
+
end
|
5980
|
+
|
5843
5981
|
class DeliveredDuty
|
5844
5982
|
|
5845
5983
|
attr_reader :value
|
@@ -5891,6 +6029,50 @@ module Io
|
|
5891
6029
|
|
5892
6030
|
end
|
5893
6031
|
|
6032
|
+
class Direction
|
6033
|
+
|
6034
|
+
attr_reader :value
|
6035
|
+
|
6036
|
+
def initialize(value)
|
6037
|
+
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
6038
|
+
end
|
6039
|
+
|
6040
|
+
# Returns the instance of Direction for this value, creating a new instance for an unknown value
|
6041
|
+
def Direction.apply(value)
|
6042
|
+
if value.instance_of?(Direction)
|
6043
|
+
value
|
6044
|
+
else
|
6045
|
+
HttpClient::Preconditions.assert_class_or_nil('value', value, String)
|
6046
|
+
value.nil? ? nil : (from_string(value) || Direction.new(value))
|
6047
|
+
end
|
6048
|
+
end
|
6049
|
+
|
6050
|
+
# Returns the instance of Direction for this value, or nil if not found
|
6051
|
+
def Direction.from_string(value)
|
6052
|
+
HttpClient::Preconditions.assert_class('value', value, String)
|
6053
|
+
Direction.ALL.find { |v| v.value == value }
|
6054
|
+
end
|
6055
|
+
|
6056
|
+
def Direction.ALL
|
6057
|
+
@@all ||= [Direction.outbound, Direction.return]
|
6058
|
+
end
|
6059
|
+
|
6060
|
+
# Outbound shipment to typically fulfill a customer order
|
6061
|
+
def Direction.outbound
|
6062
|
+
@@_outbound ||= Direction.new('outbound')
|
6063
|
+
end
|
6064
|
+
|
6065
|
+
# Inbound or return shipment
|
6066
|
+
def Direction.return
|
6067
|
+
@@_return ||= Direction.new('return')
|
6068
|
+
end
|
6069
|
+
|
6070
|
+
def to_hash
|
6071
|
+
value
|
6072
|
+
end
|
6073
|
+
|
6074
|
+
end
|
6075
|
+
|
5894
6076
|
class Environment
|
5895
6077
|
|
5896
6078
|
attr_reader :value
|
@@ -5962,7 +6144,7 @@ module Io
|
|
5962
6144
|
end
|
5963
6145
|
|
5964
6146
|
def EventType.ALL
|
5965
|
-
@@all ||= [EventType.catalog_upserted, EventType.catalog_deleted, EventType.subcatalog_upserted, EventType.subcatalog_deleted, EventType.catalog_item_upserted, EventType.catalog_item_deleted, EventType.subcatalog_item_upserted, EventType.subcatalog_item_deleted, EventType.rate_deleted, EventType.rate_upserted, EventType.experience_deleted, EventType.experience_upserted, EventType.item_margin_deleted, EventType.item_margin_upserted, EventType.label_format_deleted, EventType.label_format_upserted, EventType.order_deleted, EventType.order_upserted, EventType.order_identifier_deleted, EventType.order_identifier_upserted, EventType.pricing_deleted, EventType.pricing_upserted, EventType.hs6_code_upserted, EventType.hs6_code_deleted, EventType.hs10_code_upserted, EventType.hs10_code_deleted, EventType.item_origin_upserted, EventType.item_origin_deleted, EventType.harmonized_item_upserted, EventType.harmonized_item_deleted, EventType.snapshot_upserted, EventType.snapshot_deleted, EventType.label_upserted, EventType.notification_upserted, EventType.notification_deleted, EventType.rma_upserted, EventType.rma_deleted, EventType.localized_item_upserted, EventType.localized_item_deleted, EventType.localized_item_snapshot, EventType.organization_upserted, EventType.organization_deleted, EventType.authorization_upserted, EventType.authorization_deleted, EventType.capture_upserted, EventType.card_upserted, EventType.card_deleted, EventType.refund_upserted, EventType.targeting_item_upserted, EventType.targeting_item_deleted, EventType.tracking_label_event_upserted]
|
6147
|
+
@@all ||= [EventType.catalog_upserted, EventType.catalog_deleted, EventType.subcatalog_upserted, EventType.subcatalog_deleted, EventType.catalog_item_upserted, EventType.catalog_item_deleted, EventType.subcatalog_item_upserted, EventType.subcatalog_item_deleted, EventType.rate_deleted, EventType.rate_upserted, EventType.experience_deleted, EventType.experience_upserted, EventType.item_margin_deleted, EventType.item_margin_upserted, EventType.label_format_deleted, EventType.label_format_upserted, EventType.order_deleted, EventType.order_upserted, EventType.order_identifier_deleted, EventType.order_identifier_upserted, EventType.pricing_deleted, EventType.pricing_upserted, EventType.hs6_code_upserted, EventType.hs6_code_deleted, EventType.hs10_code_upserted, EventType.hs10_code_deleted, EventType.item_origin_upserted, EventType.item_origin_deleted, EventType.harmonized_item_upserted, EventType.harmonized_item_deleted, EventType.snapshot_upserted, EventType.snapshot_deleted, EventType.label_upserted, EventType.notification_upserted, EventType.notification_deleted, EventType.rma_upserted, EventType.rma_deleted, EventType.localized_item_upserted, EventType.localized_item_deleted, EventType.localized_item_snapshot, EventType.membership_upserted, EventType.membership_deleted, EventType.organization_upserted, EventType.organization_deleted, EventType.authorization_upserted, EventType.authorization_deleted, EventType.capture_upserted, EventType.card_upserted, EventType.card_deleted, EventType.refund_upserted, EventType.targeting_item_upserted, EventType.targeting_item_deleted, EventType.tracking_label_event_upserted]
|
5966
6148
|
end
|
5967
6149
|
|
5968
6150
|
def EventType.catalog_upserted
|
@@ -6125,6 +6307,14 @@ module Io
|
|
6125
6307
|
@@_localized_item_snapshot ||= EventType.new('localized_item_snapshot')
|
6126
6308
|
end
|
6127
6309
|
|
6310
|
+
def EventType.membership_upserted
|
6311
|
+
@@_membership_upserted ||= EventType.new('membership_upserted')
|
6312
|
+
end
|
6313
|
+
|
6314
|
+
def EventType.membership_deleted
|
6315
|
+
@@_membership_deleted ||= EventType.new('membership_deleted')
|
6316
|
+
end
|
6317
|
+
|
6128
6318
|
def EventType.organization_upserted
|
6129
6319
|
@@_organization_upserted ||= EventType.new('organization_upserted')
|
6130
6320
|
end
|
@@ -6957,6 +7147,48 @@ module Io
|
|
6957
7147
|
|
6958
7148
|
end
|
6959
7149
|
|
7150
|
+
class OrderStatus
|
7151
|
+
|
7152
|
+
attr_reader :value
|
7153
|
+
|
7154
|
+
def initialize(value)
|
7155
|
+
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
7156
|
+
end
|
7157
|
+
|
7158
|
+
# Returns the instance of OrderStatus for this value, creating a new instance for an unknown value
|
7159
|
+
def OrderStatus.apply(value)
|
7160
|
+
if value.instance_of?(OrderStatus)
|
7161
|
+
value
|
7162
|
+
else
|
7163
|
+
HttpClient::Preconditions.assert_class_or_nil('value', value, String)
|
7164
|
+
value.nil? ? nil : (from_string(value) || OrderStatus.new(value))
|
7165
|
+
end
|
7166
|
+
end
|
7167
|
+
|
7168
|
+
# Returns the instance of OrderStatus for this value, or nil if not found
|
7169
|
+
def OrderStatus.from_string(value)
|
7170
|
+
HttpClient::Preconditions.assert_class('value', value, String)
|
7171
|
+
OrderStatus.ALL.find { |v| v.value == value }
|
7172
|
+
end
|
7173
|
+
|
7174
|
+
def OrderStatus.ALL
|
7175
|
+
@@all ||= [OrderStatus.open, OrderStatus.submitted]
|
7176
|
+
end
|
7177
|
+
|
7178
|
+
def OrderStatus.open
|
7179
|
+
@@_open ||= OrderStatus.new('open')
|
7180
|
+
end
|
7181
|
+
|
7182
|
+
def OrderStatus.submitted
|
7183
|
+
@@_submitted ||= OrderStatus.new('submitted')
|
7184
|
+
end
|
7185
|
+
|
7186
|
+
def to_hash
|
7187
|
+
value
|
7188
|
+
end
|
7189
|
+
|
7190
|
+
end
|
7191
|
+
|
6960
7192
|
class PriceDetailComponentKey
|
6961
7193
|
|
6962
7194
|
attr_reader :value
|
@@ -7317,7 +7549,7 @@ module Io
|
|
7317
7549
|
|
7318
7550
|
end
|
7319
7551
|
|
7320
|
-
class
|
7552
|
+
class ReturnStatus
|
7321
7553
|
|
7322
7554
|
attr_reader :value
|
7323
7555
|
|
@@ -7325,32 +7557,32 @@ module Io
|
|
7325
7557
|
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
7326
7558
|
end
|
7327
7559
|
|
7328
|
-
# Returns the instance of
|
7329
|
-
def
|
7330
|
-
if value.instance_of?(
|
7560
|
+
# Returns the instance of ReturnStatus for this value, creating a new instance for an unknown value
|
7561
|
+
def ReturnStatus.apply(value)
|
7562
|
+
if value.instance_of?(ReturnStatus)
|
7331
7563
|
value
|
7332
7564
|
else
|
7333
7565
|
HttpClient::Preconditions.assert_class_or_nil('value', value, String)
|
7334
|
-
value.nil? ? nil : (from_string(value) ||
|
7566
|
+
value.nil? ? nil : (from_string(value) || ReturnStatus.new(value))
|
7335
7567
|
end
|
7336
7568
|
end
|
7337
7569
|
|
7338
|
-
# Returns the instance of
|
7339
|
-
def
|
7570
|
+
# Returns the instance of ReturnStatus for this value, or nil if not found
|
7571
|
+
def ReturnStatus.from_string(value)
|
7340
7572
|
HttpClient::Preconditions.assert_class('value', value, String)
|
7341
|
-
|
7573
|
+
ReturnStatus.ALL.find { |v| v.value == value }
|
7342
7574
|
end
|
7343
7575
|
|
7344
|
-
def
|
7345
|
-
@@all ||= [
|
7576
|
+
def ReturnStatus.ALL
|
7577
|
+
@@all ||= [ReturnStatus.open, ReturnStatus.refunded]
|
7346
7578
|
end
|
7347
7579
|
|
7348
|
-
def
|
7349
|
-
@@
|
7580
|
+
def ReturnStatus.open
|
7581
|
+
@@_open ||= ReturnStatus.new('open')
|
7350
7582
|
end
|
7351
7583
|
|
7352
|
-
def
|
7353
|
-
@@
|
7584
|
+
def ReturnStatus.refunded
|
7585
|
+
@@_refunded ||= ReturnStatus.new('refunded')
|
7354
7586
|
end
|
7355
7587
|
|
7356
7588
|
def to_hash
|
@@ -7359,7 +7591,49 @@ module Io
|
|
7359
7591
|
|
7360
7592
|
end
|
7361
7593
|
|
7362
|
-
class
|
7594
|
+
class Role
|
7595
|
+
|
7596
|
+
attr_reader :value
|
7597
|
+
|
7598
|
+
def initialize(value)
|
7599
|
+
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
7600
|
+
end
|
7601
|
+
|
7602
|
+
# Returns the instance of Role for this value, creating a new instance for an unknown value
|
7603
|
+
def Role.apply(value)
|
7604
|
+
if value.instance_of?(Role)
|
7605
|
+
value
|
7606
|
+
else
|
7607
|
+
HttpClient::Preconditions.assert_class_or_nil('value', value, String)
|
7608
|
+
value.nil? ? nil : (from_string(value) || Role.new(value))
|
7609
|
+
end
|
7610
|
+
end
|
7611
|
+
|
7612
|
+
# Returns the instance of Role for this value, or nil if not found
|
7613
|
+
def Role.from_string(value)
|
7614
|
+
HttpClient::Preconditions.assert_class('value', value, String)
|
7615
|
+
Role.ALL.find { |v| v.value == value }
|
7616
|
+
end
|
7617
|
+
|
7618
|
+
def Role.ALL
|
7619
|
+
@@all ||= [Role.admin, Role.member]
|
7620
|
+
end
|
7621
|
+
|
7622
|
+
def Role.admin
|
7623
|
+
@@_admin ||= Role.new('admin')
|
7624
|
+
end
|
7625
|
+
|
7626
|
+
def Role.member
|
7627
|
+
@@_member ||= Role.new('member')
|
7628
|
+
end
|
7629
|
+
|
7630
|
+
def to_hash
|
7631
|
+
value
|
7632
|
+
end
|
7633
|
+
|
7634
|
+
end
|
7635
|
+
|
7636
|
+
class RoundingMethod
|
7363
7637
|
|
7364
7638
|
attr_reader :value
|
7365
7639
|
|
@@ -8801,7 +9075,7 @@ module Io
|
|
8801
9075
|
# capture up to the amount of the authorization.
|
8802
9076
|
class Authorization
|
8803
9077
|
|
8804
|
-
attr_reader :id, :key, :card, :amount, :currency, :customer, :attributes, :destination, :ip, :result, :created_at
|
9078
|
+
attr_reader :id, :key, :card, :amount, :currency, :customer, :attributes, :destination, :order, :ip, :result, :created_at
|
8805
9079
|
|
8806
9080
|
def initialize(incoming={})
|
8807
9081
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
@@ -8814,6 +9088,7 @@ module Io
|
|
8814
9088
|
@customer = (x = opts.delete(:customer); x.is_a?(::Io::Flow::V0::Models::Customer) ? x : ::Io::Flow::V0::Models::Customer.new(x))
|
8815
9089
|
@attributes = HttpClient::Preconditions.assert_class('attributes', opts.delete(:attributes), Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('attributes', d[1], String); h }
|
8816
9090
|
@destination = (x = opts.delete(:destination); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Address) ? x : ::Io::Flow::V0::Models::Address.new(x)))
|
9091
|
+
@order = (x = opts.delete(:order); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::AuthorizationOrderReference) ? x : ::Io::Flow::V0::Models::AuthorizationOrderReference.new(x)))
|
8817
9092
|
@ip = (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String))
|
8818
9093
|
@result = (x = opts.delete(:result); x.is_a?(::Io::Flow::V0::Models::AuthorizationResult) ? x : ::Io::Flow::V0::Models::AuthorizationResult.new(x))
|
8819
9094
|
@created_at = HttpClient::Preconditions.assert_class('created_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:created_at)), DateTime)
|
@@ -8837,6 +9112,7 @@ module Io
|
|
8837
9112
|
:customer => customer.to_hash,
|
8838
9113
|
:attributes => attributes,
|
8839
9114
|
:destination => destination.nil? ? nil : destination.to_hash,
|
9115
|
+
:order => order.nil? ? nil : order.to_hash,
|
8840
9116
|
:ip => ip,
|
8841
9117
|
:result => result.to_hash,
|
8842
9118
|
:created_at => created_at
|
@@ -8906,6 +9182,32 @@ module Io
|
|
8906
9182
|
|
8907
9183
|
end
|
8908
9184
|
|
9185
|
+
class AuthorizationOrderReference
|
9186
|
+
|
9187
|
+
attr_reader :number
|
9188
|
+
|
9189
|
+
def initialize(incoming={})
|
9190
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
9191
|
+
HttpClient::Preconditions.require_keys(opts, [:number], 'AuthorizationOrderReference')
|
9192
|
+
@number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
|
9193
|
+
end
|
9194
|
+
|
9195
|
+
def to_json
|
9196
|
+
JSON.dump(to_hash)
|
9197
|
+
end
|
9198
|
+
|
9199
|
+
def copy(incoming={})
|
9200
|
+
AuthorizationOrderReference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
9201
|
+
end
|
9202
|
+
|
9203
|
+
def to_hash
|
9204
|
+
{
|
9205
|
+
:number => number
|
9206
|
+
}
|
9207
|
+
end
|
9208
|
+
|
9209
|
+
end
|
9210
|
+
|
8909
9211
|
class AuthorizationReference
|
8910
9212
|
|
8911
9213
|
attr_reader :id
|
@@ -9053,16 +9355,18 @@ module Io
|
|
9053
9355
|
|
9054
9356
|
end
|
9055
9357
|
|
9056
|
-
# Representation of a service level available at a center
|
9057
|
-
#
|
9358
|
+
# Representation of a service level available at a center and the special pickup
|
9359
|
+
# times during the week. If pickup schedules are not provided, assumption is
|
9360
|
+
# once a day during the weekdays.
|
9058
9361
|
class AvailableService
|
9059
9362
|
|
9060
|
-
attr_reader :service
|
9363
|
+
attr_reader :service, :scheduled_pickups
|
9061
9364
|
|
9062
9365
|
def initialize(incoming={})
|
9063
9366
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
9064
9367
|
HttpClient::Preconditions.require_keys(opts, [:service], 'AvailableService')
|
9065
9368
|
@service = HttpClient::Preconditions.assert_class('service', opts.delete(:service), String)
|
9369
|
+
@scheduled_pickups = (x = opts.delete(:scheduled_pickups); x.nil? ? nil : HttpClient::Preconditions.assert_class('scheduled_pickups', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ScheduledPickup) ? x : ::Io::Flow::V0::Models::ScheduledPickup.new(x)) })
|
9066
9370
|
end
|
9067
9371
|
|
9068
9372
|
def to_json
|
@@ -9075,7 +9379,8 @@ module Io
|
|
9075
9379
|
|
9076
9380
|
def to_hash
|
9077
9381
|
{
|
9078
|
-
:service => service
|
9382
|
+
:service => service,
|
9383
|
+
:scheduled_pickups => scheduled_pickups.nil? ? nil : scheduled_pickups.map { |o| o.to_hash }
|
9079
9384
|
}
|
9080
9385
|
end
|
9081
9386
|
|
@@ -9745,39 +10050,13 @@ module Io
|
|
9745
10050
|
|
9746
10051
|
end
|
9747
10052
|
|
9748
|
-
class CatalogItemDocumentImage
|
9749
|
-
|
9750
|
-
attr_reader :url
|
9751
|
-
|
9752
|
-
def initialize(incoming={})
|
9753
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
9754
|
-
HttpClient::Preconditions.require_keys(opts, [:url], 'CatalogItemDocumentImage')
|
9755
|
-
@url = HttpClient::Preconditions.assert_class('url', opts.delete(:url), String)
|
9756
|
-
end
|
9757
|
-
|
9758
|
-
def to_json
|
9759
|
-
JSON.dump(to_hash)
|
9760
|
-
end
|
9761
|
-
|
9762
|
-
def copy(incoming={})
|
9763
|
-
CatalogItemDocumentImage.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
9764
|
-
end
|
9765
|
-
|
9766
|
-
def to_hash
|
9767
|
-
{
|
9768
|
-
:url => url
|
9769
|
-
}
|
9770
|
-
end
|
9771
|
-
|
9772
|
-
end
|
9773
|
-
|
9774
10053
|
class CatalogItemDocumentImages
|
9775
10054
|
|
9776
10055
|
attr_reader :thumbnail
|
9777
10056
|
|
9778
10057
|
def initialize(incoming={})
|
9779
10058
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
9780
|
-
@thumbnail = (x = opts.delete(:thumbnail); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::
|
10059
|
+
@thumbnail = (x = opts.delete(:thumbnail); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Image) ? x : ::Io::Flow::V0::Models::Image.new(x)))
|
9781
10060
|
end
|
9782
10061
|
|
9783
10062
|
def to_json
|
@@ -11444,14 +11723,15 @@ module Io
|
|
11444
11723
|
# a CSV file)
|
11445
11724
|
class Export
|
11446
11725
|
|
11447
|
-
attr_reader :id, :type, :status, :created_at, :started_at, :completed_at, :url, :deliveries
|
11726
|
+
attr_reader :id, :type, :status, :organization_q, :created_at, :started_at, :completed_at, :url, :deliveries
|
11448
11727
|
|
11449
11728
|
def initialize(incoming={})
|
11450
11729
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
11451
|
-
HttpClient::Preconditions.require_keys(opts, [:id, :type, :status, :created_at, :deliveries], 'Export')
|
11730
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :type, :status, :organization_q, :created_at, :deliveries], 'Export')
|
11452
11731
|
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
11453
11732
|
@type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::ExportType) ? x : ::Io::Flow::V0::Models::ExportType.from_json(x))
|
11454
11733
|
@status = (x = opts.delete(:status); x.is_a?(::Io::Flow::V0::Models::ExportStatus) ? x : ::Io::Flow::V0::Models::ExportStatus.apply(x))
|
11734
|
+
@organization_q = HttpClient::Preconditions.assert_class('organization_q', opts.delete(:organization_q), String)
|
11455
11735
|
@created_at = HttpClient::Preconditions.assert_class('created_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:created_at)), DateTime)
|
11456
11736
|
@started_at = (x = opts.delete(:started_at); x.nil? ? nil : HttpClient::Preconditions.assert_class('started_at', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
|
11457
11737
|
@completed_at = (x = opts.delete(:completed_at); x.nil? ? nil : HttpClient::Preconditions.assert_class('completed_at', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
|
@@ -11472,6 +11752,7 @@ module Io
|
|
11472
11752
|
:id => id,
|
11473
11753
|
:type => type.to_hash,
|
11474
11754
|
:status => status.value,
|
11755
|
+
:organization_q => organization_q,
|
11475
11756
|
:created_at => created_at,
|
11476
11757
|
:started_at => started_at,
|
11477
11758
|
:completed_at => completed_at,
|
@@ -11515,13 +11796,14 @@ module Io
|
|
11515
11796
|
# export (e.g. the filters to apply to select the desired data).
|
11516
11797
|
class ExportForm
|
11517
11798
|
|
11518
|
-
attr_reader :type, :emails
|
11799
|
+
attr_reader :type, :emails, :organization_q
|
11519
11800
|
|
11520
11801
|
def initialize(incoming={})
|
11521
11802
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
11522
11803
|
HttpClient::Preconditions.require_keys(opts, [:type], 'ExportForm')
|
11523
11804
|
@type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::ExportType) ? x : ::Io::Flow::V0::Models::ExportType.from_json(x))
|
11524
11805
|
@emails = (x = opts.delete(:emails); x.nil? ? nil : HttpClient::Preconditions.assert_class('emails', x, Array).map { |v| HttpClient::Preconditions.assert_class('emails', v, String) })
|
11806
|
+
@organization_q = (x = opts.delete(:organization_q); x.nil? ? nil : HttpClient::Preconditions.assert_class('organization_q', x, String))
|
11525
11807
|
end
|
11526
11808
|
|
11527
11809
|
def to_json
|
@@ -11535,7 +11817,8 @@ module Io
|
|
11535
11817
|
def to_hash
|
11536
11818
|
{
|
11537
11819
|
:type => type.to_hash,
|
11538
|
-
:emails => emails.nil? ? nil : emails
|
11820
|
+
:emails => emails.nil? ? nil : emails,
|
11821
|
+
:organization_q => organization_q
|
11539
11822
|
}
|
11540
11823
|
end
|
11541
11824
|
|
@@ -11573,6 +11856,32 @@ module Io
|
|
11573
11856
|
|
11574
11857
|
end
|
11575
11858
|
|
11859
|
+
class Ference
|
11860
|
+
|
11861
|
+
attr_reader :id
|
11862
|
+
|
11863
|
+
def initialize(incoming={})
|
11864
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
11865
|
+
HttpClient::Preconditions.require_keys(opts, [:id], 'Ference')
|
11866
|
+
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
11867
|
+
end
|
11868
|
+
|
11869
|
+
def to_json
|
11870
|
+
JSON.dump(to_hash)
|
11871
|
+
end
|
11872
|
+
|
11873
|
+
def copy(incoming={})
|
11874
|
+
Ference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
11875
|
+
end
|
11876
|
+
|
11877
|
+
def to_hash
|
11878
|
+
{
|
11879
|
+
:id => id
|
11880
|
+
}
|
11881
|
+
end
|
11882
|
+
|
11883
|
+
end
|
11884
|
+
|
11576
11885
|
# Rule outcome where shipping surfaced in quote is pre-defined flat rate
|
11577
11886
|
class FlatRate < TierRuleOutcome
|
11578
11887
|
|
@@ -14896,6 +15205,37 @@ module Io
|
|
14896
15205
|
|
14897
15206
|
end
|
14898
15207
|
|
15208
|
+
class MembershipDeleted < Event
|
15209
|
+
|
15210
|
+
attr_reader :event_id, :timestamp, :id
|
15211
|
+
|
15212
|
+
def initialize(incoming={})
|
15213
|
+
super(:discriminator => Event::Types::MEMBERSHIP_DELETED)
|
15214
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
15215
|
+
HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :id], 'MembershipDeleted')
|
15216
|
+
@event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
|
15217
|
+
@timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
|
15218
|
+
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
15219
|
+
end
|
15220
|
+
|
15221
|
+
def to_json
|
15222
|
+
JSON.dump(to_hash)
|
15223
|
+
end
|
15224
|
+
|
15225
|
+
def copy(incoming={})
|
15226
|
+
MembershipDeleted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
15227
|
+
end
|
15228
|
+
|
15229
|
+
def subtype_to_hash
|
15230
|
+
{
|
15231
|
+
:event_id => event_id,
|
15232
|
+
:timestamp => timestamp,
|
15233
|
+
:id => id
|
15234
|
+
}
|
15235
|
+
end
|
15236
|
+
|
15237
|
+
end
|
15238
|
+
|
14899
15239
|
# Top level resource to create a membership.
|
14900
15240
|
class MembershipForm
|
14901
15241
|
|
@@ -14953,6 +15293,43 @@ module Io
|
|
14953
15293
|
|
14954
15294
|
end
|
14955
15295
|
|
15296
|
+
class MembershipUpserted < Event
|
15297
|
+
|
15298
|
+
attr_reader :event_id, :timestamp, :id, :organization, :user_id, :role
|
15299
|
+
|
15300
|
+
def initialize(incoming={})
|
15301
|
+
super(:discriminator => Event::Types::MEMBERSHIP_UPSERTED)
|
15302
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
15303
|
+
HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :id, :organization, :user_id, :role], 'MembershipUpserted')
|
15304
|
+
@event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
|
15305
|
+
@timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
|
15306
|
+
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
15307
|
+
@organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
|
15308
|
+
@user_id = HttpClient::Preconditions.assert_class('user_id', opts.delete(:user_id), String)
|
15309
|
+
@role = HttpClient::Preconditions.assert_class('role', opts.delete(:role), String)
|
15310
|
+
end
|
15311
|
+
|
15312
|
+
def to_json
|
15313
|
+
JSON.dump(to_hash)
|
15314
|
+
end
|
15315
|
+
|
15316
|
+
def copy(incoming={})
|
15317
|
+
MembershipUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
15318
|
+
end
|
15319
|
+
|
15320
|
+
def subtype_to_hash
|
15321
|
+
{
|
15322
|
+
:event_id => event_id,
|
15323
|
+
:timestamp => timestamp,
|
15324
|
+
:id => id,
|
15325
|
+
:organization => organization,
|
15326
|
+
:user_id => user_id,
|
15327
|
+
:role => role
|
15328
|
+
}
|
15329
|
+
end
|
15330
|
+
|
15331
|
+
end
|
15332
|
+
|
14956
15333
|
class MembershipVersion
|
14957
15334
|
|
14958
15335
|
attr_reader :id, :timestamp, :type, :membership
|
@@ -15505,6 +15882,45 @@ module Io
|
|
15505
15882
|
|
15506
15883
|
end
|
15507
15884
|
|
15885
|
+
# Exports orders
|
15886
|
+
class OrderExportType < ExportType
|
15887
|
+
|
15888
|
+
attr_reader :numbers, :min_hours_since_submitted_at, :submitted_on_or_before, :submitted_on_or_after, :status, :has_tracking_label, :sort
|
15889
|
+
|
15890
|
+
def initialize(incoming={})
|
15891
|
+
super(:discriminator => ExportType::Types::ORDER_EXPORT_TYPE)
|
15892
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
15893
|
+
@numbers = (x = opts.delete(:numbers); x.nil? ? nil : HttpClient::Preconditions.assert_class('numbers', x, Array).map { |v| HttpClient::Preconditions.assert_class('numbers', v, String) })
|
15894
|
+
@min_hours_since_submitted_at = (x = opts.delete(:min_hours_since_submitted_at); x.nil? ? nil : HttpClient::Preconditions.assert_class('min_hours_since_submitted_at', x, Integer))
|
15895
|
+
@submitted_on_or_before = (x = opts.delete(:submitted_on_or_before); x.nil? ? nil : HttpClient::Preconditions.assert_class('submitted_on_or_before', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
|
15896
|
+
@submitted_on_or_after = (x = opts.delete(:submitted_on_or_after); x.nil? ? nil : HttpClient::Preconditions.assert_class('submitted_on_or_after', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
|
15897
|
+
@status = (x = opts.delete(:status); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::OrderStatus) ? x : ::Io::Flow::V0::Models::OrderStatus.apply(x)))
|
15898
|
+
@has_tracking_label = (x = opts.delete(:has_tracking_label); x.nil? ? nil : HttpClient::Preconditions.assert_boolean('has_tracking_label', x))
|
15899
|
+
@sort = (x = opts.delete(:sort); x.nil? ? nil : HttpClient::Preconditions.assert_class('sort', x, String))
|
15900
|
+
end
|
15901
|
+
|
15902
|
+
def to_json
|
15903
|
+
JSON.dump(to_hash)
|
15904
|
+
end
|
15905
|
+
|
15906
|
+
def copy(incoming={})
|
15907
|
+
OrderExportType.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
15908
|
+
end
|
15909
|
+
|
15910
|
+
def subtype_to_hash
|
15911
|
+
{
|
15912
|
+
:numbers => numbers.nil? ? nil : numbers,
|
15913
|
+
:min_hours_since_submitted_at => min_hours_since_submitted_at,
|
15914
|
+
:submitted_on_or_before => submitted_on_or_before,
|
15915
|
+
:submitted_on_or_after => submitted_on_or_after,
|
15916
|
+
:status => status.nil? ? nil : status.value,
|
15917
|
+
:has_tracking_label => has_tracking_label,
|
15918
|
+
:sort => sort
|
15919
|
+
}
|
15920
|
+
end
|
15921
|
+
|
15922
|
+
end
|
15923
|
+
|
15508
15924
|
# The order form is used to create an open order, providing the details on
|
15509
15925
|
# pricing and delivery options for destination and items/quantities specified
|
15510
15926
|
class OrderForm
|
@@ -17609,7 +18025,7 @@ module Io
|
|
17609
18025
|
# order number (or all of them as long as they match).
|
17610
18026
|
class RefundForm
|
17611
18027
|
|
17612
|
-
attr_reader :authorization_id, :capture_id, :order_number, :key, :amount, :currency
|
18028
|
+
attr_reader :authorization_id, :capture_id, :order_number, :key, :amount, :currency, :rma_key
|
17613
18029
|
|
17614
18030
|
def initialize(incoming={})
|
17615
18031
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
@@ -17619,6 +18035,7 @@ module Io
|
|
17619
18035
|
@key = (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, String))
|
17620
18036
|
@amount = (x = opts.delete(:amount); x.nil? ? nil : HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(x), BigDecimal))
|
17621
18037
|
@currency = (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String))
|
18038
|
+
@rma_key = (x = opts.delete(:rma_key); x.nil? ? nil : HttpClient::Preconditions.assert_class('rma_key', x, String))
|
17622
18039
|
end
|
17623
18040
|
|
17624
18041
|
def to_json
|
@@ -17636,7 +18053,8 @@ module Io
|
|
17636
18053
|
:order_number => order_number,
|
17637
18054
|
:key => key,
|
17638
18055
|
:amount => amount,
|
17639
|
-
:currency => currency
|
18056
|
+
:currency => currency,
|
18057
|
+
:rma_key => rma_key
|
17640
18058
|
}
|
17641
18059
|
end
|
17642
18060
|
|
@@ -17851,26 +18269,17 @@ module Io
|
|
17851
18269
|
|
17852
18270
|
end
|
17853
18271
|
|
17854
|
-
class
|
18272
|
+
class Return
|
17855
18273
|
|
17856
|
-
attr_reader :id, :
|
18274
|
+
attr_reader :id, :key, :items, :labels
|
17857
18275
|
|
17858
18276
|
def initialize(incoming={})
|
17859
18277
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
17860
|
-
HttpClient::Preconditions.require_keys(opts, [:id, :
|
18278
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :key, :items, :labels], 'Return')
|
17861
18279
|
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
17862
|
-
@
|
17863
|
-
@
|
17864
|
-
@
|
17865
|
-
@destination = (x = opts.delete(:destination); x.is_a?(::Io::Flow::V0::Models::ShippingAddress) ? x : ::Io::Flow::V0::Models::ShippingAddress.new(x))
|
17866
|
-
@flow_tracking_number = HttpClient::Preconditions.assert_class('flow_tracking_number', opts.delete(:flow_tracking_number), String)
|
17867
|
-
@number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
|
17868
|
-
@order_number = HttpClient::Preconditions.assert_class('order_number', opts.delete(:order_number), String)
|
17869
|
-
@origin = (x = opts.delete(:origin); x.is_a?(::Io::Flow::V0::Models::ShippingAddress) ? x : ::Io::Flow::V0::Models::ShippingAddress.new(x))
|
17870
|
-
@service = (x = opts.delete(:service); x.is_a?(::Io::Flow::V0::Models::ServiceSummary) ? x : ::Io::Flow::V0::Models::ServiceSummary.new(x))
|
17871
|
-
@zpl = (x = opts.delete(:zpl); x.nil? ? nil : HttpClient::Preconditions.assert_class('zpl', x, String))
|
17872
|
-
@pdf = (x = opts.delete(:pdf); x.nil? ? nil : HttpClient::Preconditions.assert_class('pdf', x, String))
|
17873
|
-
@png = (x = opts.delete(:png); x.nil? ? nil : HttpClient::Preconditions.assert_class('png', x, String))
|
18280
|
+
@key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
|
18281
|
+
@items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ReturnLineItem) ? x : ::Io::Flow::V0::Models::ReturnLineItem.new(x)) }
|
18282
|
+
@labels = HttpClient::Preconditions.assert_class('labels', opts.delete(:labels), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ShippingLabel) ? x : ::Io::Flow::V0::Models::ShippingLabel.new(x)) }
|
17874
18283
|
end
|
17875
18284
|
|
17876
18285
|
def to_json
|
@@ -17878,42 +18287,32 @@ module Io
|
|
17878
18287
|
end
|
17879
18288
|
|
17880
18289
|
def copy(incoming={})
|
17881
|
-
|
18290
|
+
Return.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
17882
18291
|
end
|
17883
18292
|
|
17884
18293
|
def to_hash
|
17885
18294
|
{
|
17886
18295
|
:id => id,
|
17887
|
-
:
|
17888
|
-
:
|
17889
|
-
:
|
17890
|
-
:destination => destination.to_hash,
|
17891
|
-
:flow_tracking_number => flow_tracking_number,
|
17892
|
-
:number => number,
|
17893
|
-
:order_number => order_number,
|
17894
|
-
:origin => origin.to_hash,
|
17895
|
-
:service => service.to_hash,
|
17896
|
-
:zpl => zpl,
|
17897
|
-
:pdf => pdf,
|
17898
|
-
:png => png
|
18296
|
+
:key => key,
|
18297
|
+
:items => items.map { |o| o.to_hash },
|
18298
|
+
:labels => labels.map { |o| o.to_hash }
|
17899
18299
|
}
|
17900
18300
|
end
|
17901
18301
|
|
17902
18302
|
end
|
17903
18303
|
|
17904
|
-
class
|
18304
|
+
class ReturnForm
|
17905
18305
|
|
17906
|
-
attr_reader :
|
18306
|
+
attr_reader :items, :service, :destination, :key, :origin
|
17907
18307
|
|
17908
18308
|
def initialize(incoming={})
|
17909
|
-
super(:discriminator => Event::Types::RMA_DELETED)
|
17910
18309
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
17911
|
-
HttpClient::Preconditions.require_keys(opts, [:
|
17912
|
-
@
|
17913
|
-
@
|
17914
|
-
@
|
17915
|
-
@
|
17916
|
-
@
|
18310
|
+
HttpClient::Preconditions.require_keys(opts, [:items], 'ReturnForm')
|
18311
|
+
@items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ReturnLineItem) ? x : ::Io::Flow::V0::Models::ReturnLineItem.new(x)) }
|
18312
|
+
@service = (x = opts.delete(:service); x.nil? ? nil : HttpClient::Preconditions.assert_class('service', x, String))
|
18313
|
+
@destination = (x = opts.delete(:destination); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ShippingAddress) ? x : ::Io::Flow::V0::Models::ShippingAddress.new(x)))
|
18314
|
+
@key = (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, String))
|
18315
|
+
@origin = (x = opts.delete(:origin); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ShippingAddress) ? x : ::Io::Flow::V0::Models::ShippingAddress.new(x)))
|
17917
18316
|
end
|
17918
18317
|
|
17919
18318
|
def to_json
|
@@ -17921,35 +18320,29 @@ module Io
|
|
17921
18320
|
end
|
17922
18321
|
|
17923
18322
|
def copy(incoming={})
|
17924
|
-
|
18323
|
+
ReturnForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
17925
18324
|
end
|
17926
18325
|
|
17927
|
-
def
|
18326
|
+
def to_hash
|
17928
18327
|
{
|
17929
|
-
:
|
17930
|
-
:
|
17931
|
-
:
|
17932
|
-
:
|
17933
|
-
:
|
18328
|
+
:items => items.map { |o| o.to_hash },
|
18329
|
+
:service => service,
|
18330
|
+
:destination => destination.nil? ? nil : destination.to_hash,
|
18331
|
+
:key => key,
|
18332
|
+
:origin => origin.nil? ? nil : origin.to_hash
|
17934
18333
|
}
|
17935
18334
|
end
|
17936
18335
|
|
17937
18336
|
end
|
17938
18337
|
|
17939
|
-
class
|
18338
|
+
class ReturnItemReference
|
17940
18339
|
|
17941
|
-
attr_reader :
|
18340
|
+
attr_reader :number
|
17942
18341
|
|
17943
18342
|
def initialize(incoming={})
|
17944
18343
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
17945
|
-
HttpClient::Preconditions.require_keys(opts, [:
|
17946
|
-
@destination = (x = opts.delete(:destination); x.is_a?(::Io::Flow::V0::Models::ShippingAddress) ? x : ::Io::Flow::V0::Models::ShippingAddress.new(x))
|
18344
|
+
HttpClient::Preconditions.require_keys(opts, [:number], 'ReturnItemReference')
|
17947
18345
|
@number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
|
17948
|
-
@order_number = HttpClient::Preconditions.assert_class('order_number', opts.delete(:order_number), String)
|
17949
|
-
@origin = (x = opts.delete(:origin); x.is_a?(::Io::Flow::V0::Models::ShippingAddress) ? x : ::Io::Flow::V0::Models::ShippingAddress.new(x))
|
17950
|
-
@package = (x = opts.delete(:package); x.is_a?(::Io::Flow::V0::Models::ShippingLabelPackage) ? x : ::Io::Flow::V0::Models::ShippingLabelPackage.new(x))
|
17951
|
-
@service = HttpClient::Preconditions.assert_class('service', opts.delete(:service), String)
|
17952
|
-
@attributes = (x = opts.delete(:attributes); x.nil? ? nil : HttpClient::Preconditions.assert_class('attributes', x, Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('attributes', d[1], String); h })
|
17953
18346
|
end
|
17954
18347
|
|
17955
18348
|
def to_json
|
@@ -17957,18 +18350,219 @@ module Io
|
|
17957
18350
|
end
|
17958
18351
|
|
17959
18352
|
def copy(incoming={})
|
17960
|
-
|
18353
|
+
ReturnItemReference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
17961
18354
|
end
|
17962
18355
|
|
17963
18356
|
def to_hash
|
17964
18357
|
{
|
17965
|
-
:
|
17966
|
-
|
17967
|
-
|
17968
|
-
|
17969
|
-
|
17970
|
-
|
17971
|
-
|
18358
|
+
:number => number
|
18359
|
+
}
|
18360
|
+
end
|
18361
|
+
|
18362
|
+
end
|
18363
|
+
|
18364
|
+
class ReturnLineItem
|
18365
|
+
|
18366
|
+
attr_reader :item_number, :order_number, :quantity, :reason, :notes
|
18367
|
+
|
18368
|
+
def initialize(incoming={})
|
18369
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
18370
|
+
HttpClient::Preconditions.require_keys(opts, [:item_number, :quantity], 'ReturnLineItem')
|
18371
|
+
@item_number = HttpClient::Preconditions.assert_class('item_number', opts.delete(:item_number), String)
|
18372
|
+
@order_number = (x = opts.delete(:order_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('order_number', x, String))
|
18373
|
+
@quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
|
18374
|
+
@reason = (x = opts.delete(:reason); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ReturnReason) ? x : ::Io::Flow::V0::Models::ReturnReason.new(x)))
|
18375
|
+
@notes = (x = opts.delete(:notes); x.nil? ? nil : HttpClient::Preconditions.assert_class('notes', x, String))
|
18376
|
+
end
|
18377
|
+
|
18378
|
+
def to_json
|
18379
|
+
JSON.dump(to_hash)
|
18380
|
+
end
|
18381
|
+
|
18382
|
+
def copy(incoming={})
|
18383
|
+
ReturnLineItem.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
18384
|
+
end
|
18385
|
+
|
18386
|
+
def to_hash
|
18387
|
+
{
|
18388
|
+
:item_number => item_number,
|
18389
|
+
:order_number => order_number,
|
18390
|
+
:quantity => quantity,
|
18391
|
+
:reason => reason.nil? ? nil : reason.to_hash,
|
18392
|
+
:notes => notes
|
18393
|
+
}
|
18394
|
+
end
|
18395
|
+
|
18396
|
+
end
|
18397
|
+
|
18398
|
+
class ReturnOrderReference
|
18399
|
+
|
18400
|
+
attr_reader :number
|
18401
|
+
|
18402
|
+
def initialize(incoming={})
|
18403
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
18404
|
+
HttpClient::Preconditions.require_keys(opts, [:number], 'ReturnOrderReference')
|
18405
|
+
@number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
|
18406
|
+
end
|
18407
|
+
|
18408
|
+
def to_json
|
18409
|
+
JSON.dump(to_hash)
|
18410
|
+
end
|
18411
|
+
|
18412
|
+
def copy(incoming={})
|
18413
|
+
ReturnOrderReference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
18414
|
+
end
|
18415
|
+
|
18416
|
+
def to_hash
|
18417
|
+
{
|
18418
|
+
:number => number
|
18419
|
+
}
|
18420
|
+
end
|
18421
|
+
|
18422
|
+
end
|
18423
|
+
|
18424
|
+
class ReturnReason
|
18425
|
+
|
18426
|
+
attr_reader :key, :name
|
18427
|
+
|
18428
|
+
def initialize(incoming={})
|
18429
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
18430
|
+
HttpClient::Preconditions.require_keys(opts, [:key, :name], 'ReturnReason')
|
18431
|
+
@key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
|
18432
|
+
@name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
|
18433
|
+
end
|
18434
|
+
|
18435
|
+
def to_json
|
18436
|
+
JSON.dump(to_hash)
|
18437
|
+
end
|
18438
|
+
|
18439
|
+
def copy(incoming={})
|
18440
|
+
ReturnReason.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
18441
|
+
end
|
18442
|
+
|
18443
|
+
def to_hash
|
18444
|
+
{
|
18445
|
+
:key => key,
|
18446
|
+
:name => name
|
18447
|
+
}
|
18448
|
+
end
|
18449
|
+
|
18450
|
+
end
|
18451
|
+
|
18452
|
+
class ReturnReasonForm
|
18453
|
+
|
18454
|
+
attr_reader :key, :name
|
18455
|
+
|
18456
|
+
def initialize(incoming={})
|
18457
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
18458
|
+
@key = (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, String))
|
18459
|
+
@name = (x = opts.delete(:name); x.nil? ? nil : HttpClient::Preconditions.assert_class('name', x, String))
|
18460
|
+
end
|
18461
|
+
|
18462
|
+
def to_json
|
18463
|
+
JSON.dump(to_hash)
|
18464
|
+
end
|
18465
|
+
|
18466
|
+
def copy(incoming={})
|
18467
|
+
ReturnReasonForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
18468
|
+
end
|
18469
|
+
|
18470
|
+
def to_hash
|
18471
|
+
{
|
18472
|
+
:key => key,
|
18473
|
+
:name => name
|
18474
|
+
}
|
18475
|
+
end
|
18476
|
+
|
18477
|
+
end
|
18478
|
+
|
18479
|
+
class ReturnReasonPutForm
|
18480
|
+
|
18481
|
+
attr_reader :name
|
18482
|
+
|
18483
|
+
def initialize(incoming={})
|
18484
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
18485
|
+
@name = (x = opts.delete(:name); x.nil? ? nil : HttpClient::Preconditions.assert_class('name', x, String))
|
18486
|
+
end
|
18487
|
+
|
18488
|
+
def to_json
|
18489
|
+
JSON.dump(to_hash)
|
18490
|
+
end
|
18491
|
+
|
18492
|
+
def copy(incoming={})
|
18493
|
+
ReturnReasonPutForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
18494
|
+
end
|
18495
|
+
|
18496
|
+
def to_hash
|
18497
|
+
{
|
18498
|
+
:name => name
|
18499
|
+
}
|
18500
|
+
end
|
18501
|
+
|
18502
|
+
end
|
18503
|
+
|
18504
|
+
class ReturnVersion
|
18505
|
+
|
18506
|
+
attr_reader :id, :timestamp, :type, :return_
|
18507
|
+
|
18508
|
+
def initialize(incoming={})
|
18509
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
18510
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :timestamp, :type, :return_], 'ReturnVersion')
|
18511
|
+
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
18512
|
+
@timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
|
18513
|
+
@type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::ChangeType) ? x : ::Io::Flow::V0::Models::ChangeType.apply(x))
|
18514
|
+
@return_ = (x = opts.delete(:return); x.is_a?(::Io::Flow::V0::Models::Return) ? x : ::Io::Flow::V0::Models::Return.new(x))
|
18515
|
+
end
|
18516
|
+
|
18517
|
+
def to_json
|
18518
|
+
JSON.dump(to_hash)
|
18519
|
+
end
|
18520
|
+
|
18521
|
+
def copy(incoming={})
|
18522
|
+
ReturnVersion.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
18523
|
+
end
|
18524
|
+
|
18525
|
+
def to_hash
|
18526
|
+
{
|
18527
|
+
:id => id,
|
18528
|
+
:timestamp => timestamp,
|
18529
|
+
:type => type.value,
|
18530
|
+
:return => return_.to_hash
|
18531
|
+
}
|
18532
|
+
end
|
18533
|
+
|
18534
|
+
end
|
18535
|
+
|
18536
|
+
class RmaDeleted < Event
|
18537
|
+
|
18538
|
+
attr_reader :event_id, :timestamp, :organization, :number, :rma_id
|
18539
|
+
|
18540
|
+
def initialize(incoming={})
|
18541
|
+
super(:discriminator => Event::Types::RMA_DELETED)
|
18542
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
18543
|
+
HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :number, :rma_id], 'RmaDeleted')
|
18544
|
+
@event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
|
18545
|
+
@timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
|
18546
|
+
@organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
|
18547
|
+
@number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
|
18548
|
+
@rma_id = HttpClient::Preconditions.assert_class('rma_id', opts.delete(:rma_id), String)
|
18549
|
+
end
|
18550
|
+
|
18551
|
+
def to_json
|
18552
|
+
JSON.dump(to_hash)
|
18553
|
+
end
|
18554
|
+
|
18555
|
+
def copy(incoming={})
|
18556
|
+
RmaDeleted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
18557
|
+
end
|
18558
|
+
|
18559
|
+
def subtype_to_hash
|
18560
|
+
{
|
18561
|
+
:event_id => event_id,
|
18562
|
+
:timestamp => timestamp,
|
18563
|
+
:organization => organization,
|
18564
|
+
:number => number,
|
18565
|
+
:rma_id => rma_id
|
17972
18566
|
}
|
17973
18567
|
end
|
17974
18568
|
|
@@ -18031,38 +18625,6 @@ module Io
|
|
18031
18625
|
|
18032
18626
|
end
|
18033
18627
|
|
18034
|
-
class RmaVersion
|
18035
|
-
|
18036
|
-
attr_reader :id, :timestamp, :type, :rma
|
18037
|
-
|
18038
|
-
def initialize(incoming={})
|
18039
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
18040
|
-
HttpClient::Preconditions.require_keys(opts, [:id, :timestamp, :type, :rma], 'RmaVersion')
|
18041
|
-
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
18042
|
-
@timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
|
18043
|
-
@type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::ChangeType) ? x : ::Io::Flow::V0::Models::ChangeType.apply(x))
|
18044
|
-
@rma = (x = opts.delete(:rma); x.is_a?(::Io::Flow::V0::Models::Rma) ? x : ::Io::Flow::V0::Models::Rma.new(x))
|
18045
|
-
end
|
18046
|
-
|
18047
|
-
def to_json
|
18048
|
-
JSON.dump(to_hash)
|
18049
|
-
end
|
18050
|
-
|
18051
|
-
def copy(incoming={})
|
18052
|
-
RmaVersion.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
18053
|
-
end
|
18054
|
-
|
18055
|
-
def to_hash
|
18056
|
-
{
|
18057
|
-
:id => id,
|
18058
|
-
:timestamp => timestamp,
|
18059
|
-
:type => type.value,
|
18060
|
-
:rma => rma.to_hash
|
18061
|
-
}
|
18062
|
-
end
|
18063
|
-
|
18064
|
-
end
|
18065
|
-
|
18066
18628
|
class Rounding
|
18067
18629
|
|
18068
18630
|
attr_reader :type, :method, :value
|
@@ -18130,6 +18692,114 @@ module Io
|
|
18130
18692
|
|
18131
18693
|
end
|
18132
18694
|
|
18695
|
+
# Allows a user to create a scheduled export that will be delivered on a
|
18696
|
+
# schedule (currently only support once / day at a set time)
|
18697
|
+
class ScheduledExport
|
18698
|
+
|
18699
|
+
attr_reader :id, :user, :organization_q, :hour, :minute, :timezone, :types, :last_sent_at
|
18700
|
+
|
18701
|
+
def initialize(incoming={})
|
18702
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
18703
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :user, :organization_q, :hour, :minute, :timezone, :types], 'ScheduledExport')
|
18704
|
+
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
18705
|
+
@user = (x = opts.delete(:user); x.is_a?(::Io::Flow::V0::Models::UserReference) ? x : ::Io::Flow::V0::Models::UserReference.new(x))
|
18706
|
+
@organization_q = HttpClient::Preconditions.assert_class('organization_q', opts.delete(:organization_q), String)
|
18707
|
+
@hour = HttpClient::Preconditions.assert_class('hour', opts.delete(:hour), Integer)
|
18708
|
+
@minute = HttpClient::Preconditions.assert_class('minute', opts.delete(:minute), Integer)
|
18709
|
+
@timezone = HttpClient::Preconditions.assert_class('timezone', opts.delete(:timezone), String)
|
18710
|
+
@types = HttpClient::Preconditions.assert_class('types', opts.delete(:types), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ExportType) ? x : ::Io::Flow::V0::Models::ExportType.from_json(x)) }
|
18711
|
+
@last_sent_at = (x = opts.delete(:last_sent_at); x.nil? ? nil : HttpClient::Preconditions.assert_class('last_sent_at', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
|
18712
|
+
end
|
18713
|
+
|
18714
|
+
def to_json
|
18715
|
+
JSON.dump(to_hash)
|
18716
|
+
end
|
18717
|
+
|
18718
|
+
def copy(incoming={})
|
18719
|
+
ScheduledExport.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
18720
|
+
end
|
18721
|
+
|
18722
|
+
def to_hash
|
18723
|
+
{
|
18724
|
+
:id => id,
|
18725
|
+
:user => user.to_hash,
|
18726
|
+
:organization_q => organization_q,
|
18727
|
+
:hour => hour,
|
18728
|
+
:minute => minute,
|
18729
|
+
:timezone => timezone,
|
18730
|
+
:types => types.map { |o| o.to_hash },
|
18731
|
+
:last_sent_at => last_sent_at
|
18732
|
+
}
|
18733
|
+
end
|
18734
|
+
|
18735
|
+
end
|
18736
|
+
|
18737
|
+
class ScheduledExportForm
|
18738
|
+
|
18739
|
+
attr_reader :user_id, :organization_q, :hour, :minute, :timezone, :types
|
18740
|
+
|
18741
|
+
def initialize(incoming={})
|
18742
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
18743
|
+
HttpClient::Preconditions.require_keys(opts, [:user_id, :organization_q, :hour, :minute, :timezone, :types], 'ScheduledExportForm')
|
18744
|
+
@user_id = HttpClient::Preconditions.assert_class('user_id', opts.delete(:user_id), String)
|
18745
|
+
@organization_q = HttpClient::Preconditions.assert_class('organization_q', opts.delete(:organization_q), String)
|
18746
|
+
@hour = HttpClient::Preconditions.assert_class('hour', opts.delete(:hour), Integer)
|
18747
|
+
@minute = HttpClient::Preconditions.assert_class('minute', opts.delete(:minute), Integer)
|
18748
|
+
@timezone = HttpClient::Preconditions.assert_class('timezone', opts.delete(:timezone), String)
|
18749
|
+
@types = HttpClient::Preconditions.assert_class('types', opts.delete(:types), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ExportType) ? x : ::Io::Flow::V0::Models::ExportType.from_json(x)) }
|
18750
|
+
end
|
18751
|
+
|
18752
|
+
def to_json
|
18753
|
+
JSON.dump(to_hash)
|
18754
|
+
end
|
18755
|
+
|
18756
|
+
def copy(incoming={})
|
18757
|
+
ScheduledExportForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
18758
|
+
end
|
18759
|
+
|
18760
|
+
def to_hash
|
18761
|
+
{
|
18762
|
+
:user_id => user_id,
|
18763
|
+
:organization_q => organization_q,
|
18764
|
+
:hour => hour,
|
18765
|
+
:minute => minute,
|
18766
|
+
:timezone => timezone,
|
18767
|
+
:types => types.map { |o| o.to_hash }
|
18768
|
+
}
|
18769
|
+
end
|
18770
|
+
|
18771
|
+
end
|
18772
|
+
|
18773
|
+
class ScheduledPickup
|
18774
|
+
|
18775
|
+
attr_reader :day_of_week, :hour_of_day, :minute_of_hour
|
18776
|
+
|
18777
|
+
def initialize(incoming={})
|
18778
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
18779
|
+
HttpClient::Preconditions.require_keys(opts, [:day_of_week, :hour_of_day, :minute_of_hour], 'ScheduledPickup')
|
18780
|
+
@day_of_week = (x = opts.delete(:day_of_week); x.is_a?(::Io::Flow::V0::Models::DayOfWeek) ? x : ::Io::Flow::V0::Models::DayOfWeek.apply(x))
|
18781
|
+
@hour_of_day = HttpClient::Preconditions.assert_class('hour_of_day', opts.delete(:hour_of_day), String)
|
18782
|
+
@minute_of_hour = HttpClient::Preconditions.assert_class('minute_of_hour', opts.delete(:minute_of_hour), String)
|
18783
|
+
end
|
18784
|
+
|
18785
|
+
def to_json
|
18786
|
+
JSON.dump(to_hash)
|
18787
|
+
end
|
18788
|
+
|
18789
|
+
def copy(incoming={})
|
18790
|
+
ScheduledPickup.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
18791
|
+
end
|
18792
|
+
|
18793
|
+
def to_hash
|
18794
|
+
{
|
18795
|
+
:day_of_week => day_of_week.value,
|
18796
|
+
:hour_of_day => hour_of_day,
|
18797
|
+
:minute_of_hour => minute_of_hour
|
18798
|
+
}
|
18799
|
+
end
|
18800
|
+
|
18801
|
+
end
|
18802
|
+
|
18133
18803
|
# Specific service rendered by the carrier (fedex ground saturday, ups overnight
|
18134
18804
|
# weekend, etc)
|
18135
18805
|
class Service
|
@@ -18250,12 +18920,13 @@ module Io
|
|
18250
18920
|
# shipper to transport a package from a given origin to destination
|
18251
18921
|
class ShippingLabel
|
18252
18922
|
|
18253
|
-
attr_reader :id, :attributes, :carrier_tracking_number, :cost, :destination, :flow_tracking_number, :origin, :service, :window, :commercial_invoice, :zpl, :pdf, :png, :order
|
18923
|
+
attr_reader :id, :direction, :attributes, :carrier_tracking_number, :cost, :destination, :flow_tracking_number, :origin, :service, :window, :commercial_invoice, :zpl, :pdf, :png, :order
|
18254
18924
|
|
18255
18925
|
def initialize(incoming={})
|
18256
18926
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
18257
|
-
HttpClient::Preconditions.require_keys(opts, [:id, :carrier_tracking_number, :cost, :destination, :flow_tracking_number, :origin, :service, :window], 'ShippingLabel')
|
18927
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :direction, :carrier_tracking_number, :cost, :destination, :flow_tracking_number, :origin, :service, :window], 'ShippingLabel')
|
18258
18928
|
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
18929
|
+
@direction = (x = opts.delete(:direction); x.is_a?(::Io::Flow::V0::Models::Direction) ? x : ::Io::Flow::V0::Models::Direction.apply(x))
|
18259
18930
|
@attributes = HttpClient::Preconditions.assert_class('attributes', (x = opts.delete(:attributes); x.nil? ? {} : x), Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('attributes', d[1], String); h }
|
18260
18931
|
@carrier_tracking_number = HttpClient::Preconditions.assert_class('carrier_tracking_number', opts.delete(:carrier_tracking_number), String)
|
18261
18932
|
@cost = (x = opts.delete(:cost); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x))
|
@@ -18282,6 +18953,7 @@ module Io
|
|
18282
18953
|
def to_hash
|
18283
18954
|
{
|
18284
18955
|
:id => id,
|
18956
|
+
:direction => direction.value,
|
18285
18957
|
:attributes => attributes,
|
18286
18958
|
:carrier_tracking_number => carrier_tracking_number,
|
18287
18959
|
:cost => cost.to_hash,
|
@@ -18302,18 +18974,19 @@ module Io
|
|
18302
18974
|
|
18303
18975
|
class ShippingLabelForm
|
18304
18976
|
|
18305
|
-
attr_reader :
|
18977
|
+
attr_reader :destination, :origin, :package, :attributes, :delivered_duty, :direction, :order_number, :service
|
18306
18978
|
|
18307
18979
|
def initialize(incoming={})
|
18308
18980
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
18309
|
-
HttpClient::Preconditions.require_keys(opts, [:
|
18310
|
-
@attributes = (x = opts.delete(:attributes); x.nil? ? nil : HttpClient::Preconditions.assert_class('attributes', x, Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('attributes', d[1], String); h })
|
18311
|
-
@delivered_duty = (x = opts.delete(:delivered_duty); x.is_a?(::Io::Flow::V0::Models::DeliveredDuty) ? x : ::Io::Flow::V0::Models::DeliveredDuty.apply(x))
|
18312
|
-
@service = HttpClient::Preconditions.assert_class('service', opts.delete(:service), String)
|
18981
|
+
HttpClient::Preconditions.require_keys(opts, [:destination, :origin, :package], 'ShippingLabelForm')
|
18313
18982
|
@destination = (x = opts.delete(:destination); x.is_a?(::Io::Flow::V0::Models::ShippingAddress) ? x : ::Io::Flow::V0::Models::ShippingAddress.new(x))
|
18314
18983
|
@origin = (x = opts.delete(:origin); x.is_a?(::Io::Flow::V0::Models::ShippingAddress) ? x : ::Io::Flow::V0::Models::ShippingAddress.new(x))
|
18315
18984
|
@package = (x = opts.delete(:package); x.is_a?(::Io::Flow::V0::Models::ShippingLabelPackage) ? x : ::Io::Flow::V0::Models::ShippingLabelPackage.new(x))
|
18985
|
+
@attributes = (x = opts.delete(:attributes); x.nil? ? nil : HttpClient::Preconditions.assert_class('attributes', x, Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('attributes', d[1], String); h })
|
18986
|
+
@delivered_duty = (x = opts.delete(:delivered_duty); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::DeliveredDuty) ? x : ::Io::Flow::V0::Models::DeliveredDuty.apply(x)))
|
18987
|
+
@direction = (x = opts.delete(:direction); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Direction) ? x : ::Io::Flow::V0::Models::Direction.apply(x)))
|
18316
18988
|
@order_number = (x = opts.delete(:order_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('order_number', x, String))
|
18989
|
+
@service = (x = opts.delete(:service); x.nil? ? nil : HttpClient::Preconditions.assert_class('service', x, String))
|
18317
18990
|
end
|
18318
18991
|
|
18319
18992
|
def to_json
|
@@ -18326,13 +18999,14 @@ module Io
|
|
18326
18999
|
|
18327
19000
|
def to_hash
|
18328
19001
|
{
|
18329
|
-
:attributes => attributes.nil? ? nil : attributes,
|
18330
|
-
:delivered_duty => delivered_duty.value,
|
18331
|
-
:service => service,
|
18332
19002
|
:destination => destination.to_hash,
|
18333
19003
|
:origin => origin.to_hash,
|
18334
19004
|
:package => package.to_hash,
|
18335
|
-
:
|
19005
|
+
:attributes => attributes.nil? ? nil : attributes,
|
19006
|
+
:delivered_duty => delivered_duty.nil? ? nil : delivered_duty.value,
|
19007
|
+
:direction => direction.nil? ? nil : direction.value,
|
19008
|
+
:order_number => order_number,
|
19009
|
+
:service => service
|
18336
19010
|
}
|
18337
19011
|
end
|
18338
19012
|
|
@@ -19499,7 +20173,7 @@ module Io
|
|
19499
20173
|
# Express tier, Economy tier
|
19500
20174
|
class Tier
|
19501
20175
|
|
19502
|
-
attr_reader :id, :experience, :integration, :name, :rules, :services, :strategy, :visibility
|
20176
|
+
attr_reader :id, :experience, :integration, :name, :rules, :services, :strategy, :visibility, :description
|
19503
20177
|
|
19504
20178
|
def initialize(incoming={})
|
19505
20179
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
@@ -19512,6 +20186,7 @@ module Io
|
|
19512
20186
|
@services = HttpClient::Preconditions.assert_class('services', opts.delete(:services), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::Service) ? x : ::Io::Flow::V0::Models::Service.new(x)) }
|
19513
20187
|
@strategy = (x = opts.delete(:strategy); x.is_a?(::Io::Flow::V0::Models::TierStrategy) ? x : ::Io::Flow::V0::Models::TierStrategy.apply(x))
|
19514
20188
|
@visibility = (x = opts.delete(:visibility); x.is_a?(::Io::Flow::V0::Models::Visibility) ? x : ::Io::Flow::V0::Models::Visibility.apply(x))
|
20189
|
+
@description = (x = opts.delete(:description); x.nil? ? nil : HttpClient::Preconditions.assert_class('description', x, String))
|
19515
20190
|
end
|
19516
20191
|
|
19517
20192
|
def to_json
|
@@ -19531,7 +20206,8 @@ module Io
|
|
19531
20206
|
:rules => rules.map { |o| o.to_hash },
|
19532
20207
|
:services => services.map { |o| o.to_hash },
|
19533
20208
|
:strategy => strategy.value,
|
19534
|
-
:visibility => visibility.value
|
20209
|
+
:visibility => visibility.value,
|
20210
|
+
:description => description
|
19535
20211
|
}
|
19536
20212
|
end
|
19537
20213
|
|
@@ -19636,7 +20312,7 @@ module Io
|
|
19636
20312
|
# Express tier, Economy tier
|
19637
20313
|
class TierForm
|
19638
20314
|
|
19639
|
-
attr_reader :currency, :experience, :integration, :name, :rules, :services, :strategy, :visibility
|
20315
|
+
attr_reader :currency, :experience, :integration, :name, :rules, :services, :strategy, :visibility, :description
|
19640
20316
|
|
19641
20317
|
def initialize(incoming={})
|
19642
20318
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
@@ -19649,6 +20325,7 @@ module Io
|
|
19649
20325
|
@services = HttpClient::Preconditions.assert_class('services', opts.delete(:services), Array).map { |v| HttpClient::Preconditions.assert_class('services', v, String) }
|
19650
20326
|
@strategy = (x = opts.delete(:strategy); x.is_a?(::Io::Flow::V0::Models::TierStrategy) ? x : ::Io::Flow::V0::Models::TierStrategy.apply(x))
|
19651
20327
|
@visibility = (x = opts.delete(:visibility); x.is_a?(::Io::Flow::V0::Models::Visibility) ? x : ::Io::Flow::V0::Models::Visibility.apply(x))
|
20328
|
+
@description = (x = opts.delete(:description); x.nil? ? nil : HttpClient::Preconditions.assert_class('description', x, String))
|
19652
20329
|
end
|
19653
20330
|
|
19654
20331
|
def to_json
|
@@ -19668,7 +20345,8 @@ module Io
|
|
19668
20345
|
:rules => rules.map { |o| o.to_hash },
|
19669
20346
|
:services => services,
|
19670
20347
|
:strategy => strategy.value,
|
19671
|
-
:visibility => visibility.value
|
20348
|
+
:visibility => visibility.value,
|
20349
|
+
:description => description
|
19672
20350
|
}
|
19673
20351
|
end
|
19674
20352
|
|