flowcommerce 0.2.57 → 0.2.58
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 +803 -22
- 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: 60efcea07de086501a8d4a394052801ec65bfcee
|
4
|
+
data.tar.gz: 8aae8863bfe8af264e2940d136afdb4bcc76cab7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e365c5a133d83de852453ce700414fb1e0cf199496289ec6f118c5948571447f72b076c5953101814317945b32622dd5225ead6add14f0be1dc2f2cedc416cd
|
7
|
+
data.tar.gz: 9b334c8c3af5efee9bc0fd37ff27317d66c3c4a90d009f843aa3b10e8b27b19254a1915d6db302c1b297cf402b440770adcc381ea76615c4b6e52df79bd24ada
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# Generated by API Builder - https://www.apibuilder.io
|
2
2
|
# Service version: 0.4.99
|
3
|
-
# apibuilder 0.14.3 app.apibuilder.io/flow/api/0.
|
3
|
+
# apibuilder 0.14.3 app.apibuilder.io/flow/api/0.5.12/ruby_client
|
4
4
|
|
5
5
|
require 'cgi'
|
6
6
|
require 'net/http'
|
@@ -25,7 +25,7 @@ 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 = 'apibuilder 0.14.3 app.apibuilder.io/flow/api/0.
|
28
|
+
USER_AGENT = 'apibuilder 0.14.3 app.apibuilder.io/flow/api/0.5.12/ruby_client' unless defined?(Constants::USER_AGENT)
|
29
29
|
VERSION = '0.4.99' unless defined?(Constants::VERSION)
|
30
30
|
VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
|
31
31
|
|
@@ -272,6 +272,10 @@ module Io
|
|
272
272
|
@returns ||= ::Io::Flow::V0::Clients::Returns.new(self)
|
273
273
|
end
|
274
274
|
|
275
|
+
def serials
|
276
|
+
@serials ||= ::Io::Flow::V0::Clients::Serials.new(self)
|
277
|
+
end
|
278
|
+
|
275
279
|
def shipping_labels
|
276
280
|
@shipping_labels ||= ::Io::Flow::V0::Clients::ShippingLabels.new(self)
|
277
281
|
end
|
@@ -388,6 +392,10 @@ module Io
|
|
388
392
|
@invitations ||= ::Io::Flow::V0::Clients::Invitations.new(self)
|
389
393
|
end
|
390
394
|
|
395
|
+
def item_query_suggestions
|
396
|
+
@item_query_suggestions ||= ::Io::Flow::V0::Clients::ItemQuerySuggestions.new(self)
|
397
|
+
end
|
398
|
+
|
391
399
|
def links
|
392
400
|
@links ||= ::Io::Flow::V0::Clients::Links.new(self)
|
393
401
|
end
|
@@ -424,6 +432,10 @@ module Io
|
|
424
432
|
@session_authorizations ||= ::Io::Flow::V0::Clients::SessionAuthorizations.new(self)
|
425
433
|
end
|
426
434
|
|
435
|
+
def shopify_private_apps
|
436
|
+
@shopify_private_apps ||= ::Io::Flow::V0::Clients::ShopifyPrivateApps.new(self)
|
437
|
+
end
|
438
|
+
|
427
439
|
def suggestions
|
428
440
|
@suggestions ||= ::Io::Flow::V0::Clients::Suggestions.new(self)
|
429
441
|
end
|
@@ -769,6 +781,7 @@ module Io
|
|
769
781
|
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
|
770
782
|
:subcatalog => (x = opts.delete(:subcatalog); x.nil? ? nil : HttpClient::Preconditions.assert_class('subcatalog', x, String)),
|
771
783
|
:ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
|
784
|
+
:status => (x = opts.delete(:status); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ExperienceStatus) ? x : ::Io::Flow::V0::Models::ExperienceStatus.apply(x)).value),
|
772
785
|
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
773
786
|
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
774
787
|
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "name" : x), String)
|
@@ -1314,6 +1327,15 @@ module Io
|
|
1314
1327
|
::Io::Flow::V0::Models::Authorization.from_json(r)
|
1315
1328
|
end
|
1316
1329
|
|
1330
|
+
# Updates an order's destination address
|
1331
|
+
def put_destination_by_number(organization, number, order_destination_put_form)
|
1332
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1333
|
+
HttpClient::Preconditions.assert_class('number', number, String)
|
1334
|
+
(x = order_destination_put_form; x.is_a?(::Io::Flow::V0::Models::OrderDestinationPutForm) ? x : ::Io::Flow::V0::Models::OrderDestinationPutForm.new(x))
|
1335
|
+
r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}/destination").with_json(order_destination_put_form.to_json).put
|
1336
|
+
::Io::Flow::V0::Models::Order.new(r)
|
1337
|
+
end
|
1338
|
+
|
1317
1339
|
# Creates an installment plan for this order, automatically associating to
|
1318
1340
|
# this order.
|
1319
1341
|
def post_installment_and_plan_and_authorizations_by_number(organization, number, installment_plan_payment_form)
|
@@ -3716,6 +3738,84 @@ module Io
|
|
3716
3738
|
|
3717
3739
|
end
|
3718
3740
|
|
3741
|
+
class Serials
|
3742
|
+
|
3743
|
+
def initialize(client)
|
3744
|
+
@client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
|
3745
|
+
end
|
3746
|
+
|
3747
|
+
def get(organization, incoming={})
|
3748
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
3749
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
3750
|
+
query = {
|
3751
|
+
:id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
|
3752
|
+
:number => (x = opts.delete(:number); x.nil? ? nil : HttpClient::Preconditions.assert_class('number', x, Array).map { |v| HttpClient::Preconditions.assert_class('number', v, String) }),
|
3753
|
+
:status => (x = opts.delete(:status); x.nil? ? nil : HttpClient::Preconditions.assert_class('status', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::SerialStatus) ? x : ::Io::Flow::V0::Models::SerialStatus.apply(x)).value }),
|
3754
|
+
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
3755
|
+
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
3756
|
+
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String)
|
3757
|
+
}.delete_if { |k, v| v.nil? }
|
3758
|
+
r = @client.request("/#{CGI.escape(organization)}/inventory/serials").with_query(query).get
|
3759
|
+
r.map { |x| ::Io::Flow::V0::Models::Serial.new(x) }
|
3760
|
+
end
|
3761
|
+
|
3762
|
+
def post(organization, serial_form)
|
3763
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
3764
|
+
(x = serial_form; x.is_a?(::Io::Flow::V0::Models::SerialForm) ? x : ::Io::Flow::V0::Models::SerialForm.new(x))
|
3765
|
+
r = @client.request("/#{CGI.escape(organization)}/inventory/serials").with_json(serial_form.to_json).post
|
3766
|
+
::Io::Flow::V0::Models::Serial.new(r)
|
3767
|
+
end
|
3768
|
+
|
3769
|
+
def get_prices_by_aggregate(organization, aggregate, incoming={})
|
3770
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
3771
|
+
(x = aggregate; x.is_a?(::Io::Flow::V0::Models::Aggregate) ? x : ::Io::Flow::V0::Models::Aggregate.apply(x))
|
3772
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
3773
|
+
query = {
|
3774
|
+
:item_number => HttpClient::Preconditions.assert_class('item_number', opts.delete(:item_number), Array).map { |v| HttpClient::Preconditions.assert_class('item_number', v, String) }
|
3775
|
+
}.delete_if { |k, v| v.nil? }
|
3776
|
+
r = @client.request("/#{CGI.escape(organization)}/inventory/serials/prices/#{aggregate.value}").with_query(query).get
|
3777
|
+
r.map { |x| ::Io::Flow::V0::Models::Serial.new(x) }
|
3778
|
+
end
|
3779
|
+
|
3780
|
+
# Provides visibility into recent changes of each object, including deletion
|
3781
|
+
def get_versions(organization, incoming={})
|
3782
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
3783
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
3784
|
+
query = {
|
3785
|
+
:id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
|
3786
|
+
:number => (x = opts.delete(:number); x.nil? ? nil : HttpClient::Preconditions.assert_class('number', x, Array).map { |v| HttpClient::Preconditions.assert_class('number', v, String) }),
|
3787
|
+
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
3788
|
+
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
3789
|
+
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
|
3790
|
+
}.delete_if { |k, v| v.nil? }
|
3791
|
+
r = @client.request("/#{CGI.escape(organization)}/inventory/serials/versions").with_query(query).get
|
3792
|
+
r.map { |x| ::Io::Flow::V0::Models::SerialVersion.new(x) }
|
3793
|
+
end
|
3794
|
+
|
3795
|
+
def get_by_number(organization, number)
|
3796
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
3797
|
+
HttpClient::Preconditions.assert_class('number', number, String)
|
3798
|
+
r = @client.request("/#{CGI.escape(organization)}/inventory/serials/#{CGI.escape(number)}").get
|
3799
|
+
::Io::Flow::V0::Models::Serial.new(r)
|
3800
|
+
end
|
3801
|
+
|
3802
|
+
def put_by_number(organization, number, serial_form)
|
3803
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
3804
|
+
HttpClient::Preconditions.assert_class('number', number, String)
|
3805
|
+
(x = serial_form; x.is_a?(::Io::Flow::V0::Models::SerialForm) ? x : ::Io::Flow::V0::Models::SerialForm.new(x))
|
3806
|
+
r = @client.request("/#{CGI.escape(organization)}/inventory/serials/#{CGI.escape(number)}").with_json(serial_form.to_json).put
|
3807
|
+
::Io::Flow::V0::Models::Serial.new(r)
|
3808
|
+
end
|
3809
|
+
|
3810
|
+
def delete_by_number(organization, number)
|
3811
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
3812
|
+
HttpClient::Preconditions.assert_class('number', number, String)
|
3813
|
+
r = @client.request("/#{CGI.escape(organization)}/inventory/serials/#{CGI.escape(number)}").delete
|
3814
|
+
nil
|
3815
|
+
end
|
3816
|
+
|
3817
|
+
end
|
3818
|
+
|
3719
3819
|
class ShippingLabels
|
3720
3820
|
|
3721
3821
|
def initialize(client)
|
@@ -4876,6 +4976,27 @@ module Io
|
|
4876
4976
|
|
4877
4977
|
end
|
4878
4978
|
|
4979
|
+
class ItemQuerySuggestions
|
4980
|
+
|
4981
|
+
def initialize(client)
|
4982
|
+
@client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
|
4983
|
+
end
|
4984
|
+
|
4985
|
+
# Returns search suggestions for catalog items
|
4986
|
+
def get(organization, incoming={})
|
4987
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
4988
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
4989
|
+
query = {
|
4990
|
+
:q => (x = opts.delete(:q); x.nil? ? nil : HttpClient::Preconditions.assert_class('q', x, String)),
|
4991
|
+
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
4992
|
+
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer)
|
4993
|
+
}.delete_if { |k, v| v.nil? }
|
4994
|
+
r = @client.request("/#{CGI.escape(organization)}/search/item/query/suggestions").with_query(query).get
|
4995
|
+
r.map { |x| ::Io::Flow::V0::Models::ItemQuerySuggestion.new(x) }
|
4996
|
+
end
|
4997
|
+
|
4998
|
+
end
|
4999
|
+
|
4879
5000
|
class Links
|
4880
5001
|
|
4881
5002
|
def initialize(client)
|
@@ -5193,6 +5314,48 @@ module Io
|
|
5193
5314
|
|
5194
5315
|
end
|
5195
5316
|
|
5317
|
+
class ShopifyPrivateApps
|
5318
|
+
|
5319
|
+
def initialize(client)
|
5320
|
+
@client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
|
5321
|
+
end
|
5322
|
+
|
5323
|
+
def get(organization, incoming={})
|
5324
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
5325
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
5326
|
+
query = {
|
5327
|
+
:id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
|
5328
|
+
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
5329
|
+
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
5330
|
+
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String)
|
5331
|
+
}.delete_if { |k, v| v.nil? }
|
5332
|
+
r = @client.request("/#{CGI.escape(organization)}/shopify/private/apps").with_query(query).get
|
5333
|
+
r.map { |x| ::Io::Flow::V0::Models::ShopifyPrivateApp.new(x) }
|
5334
|
+
end
|
5335
|
+
|
5336
|
+
def put(organization, shopify_private_app_form)
|
5337
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
5338
|
+
(x = shopify_private_app_form; x.is_a?(::Io::Flow::V0::Models::ShopifyPrivateAppForm) ? x : ::Io::Flow::V0::Models::ShopifyPrivateAppForm.new(x))
|
5339
|
+
r = @client.request("/#{CGI.escape(organization)}/shopify/private/apps").with_json(shopify_private_app_form.to_json).put
|
5340
|
+
::Io::Flow::V0::Models::ShopifyPrivateApp.new(r)
|
5341
|
+
end
|
5342
|
+
|
5343
|
+
def get_by_id(organization, id)
|
5344
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
5345
|
+
HttpClient::Preconditions.assert_class('id', id, String)
|
5346
|
+
r = @client.request("/#{CGI.escape(organization)}/shopify/private/apps/#{CGI.escape(id)}").get
|
5347
|
+
::Io::Flow::V0::Models::ShopifyPrivateApp.new(r)
|
5348
|
+
end
|
5349
|
+
|
5350
|
+
def delete_by_id(organization, id)
|
5351
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
5352
|
+
HttpClient::Preconditions.assert_class('id', id, String)
|
5353
|
+
r = @client.request("/#{CGI.escape(organization)}/shopify/private/apps/#{CGI.escape(id)}").delete
|
5354
|
+
nil
|
5355
|
+
end
|
5356
|
+
|
5357
|
+
end
|
5358
|
+
|
5196
5359
|
class Suggestions
|
5197
5360
|
|
5198
5361
|
def initialize(client)
|
@@ -5970,6 +6133,8 @@ module Io
|
|
5970
6133
|
FULLY_HARMONIZED_ITEM_UPSERTED = 'fully_harmonized_item_upserted' unless defined?(FULLY_HARMONIZED_ITEM_UPSERTED)
|
5971
6134
|
RULE_UPSERTED = 'rule_upserted' unless defined?(RULE_UPSERTED)
|
5972
6135
|
RULE_DELETED = 'rule_deleted' unless defined?(RULE_DELETED)
|
6136
|
+
SERIAL_UPSERTED = 'serial_upserted' unless defined?(SERIAL_UPSERTED)
|
6137
|
+
SERIAL_DELETED = 'serial_deleted' unless defined?(SERIAL_DELETED)
|
5973
6138
|
SNAPSHOT_UPSERTED = 'snapshot_upserted' unless defined?(SNAPSHOT_UPSERTED)
|
5974
6139
|
SNAPSHOT_DELETED = 'snapshot_deleted' unless defined?(SNAPSHOT_DELETED)
|
5975
6140
|
LABEL_UPSERTED = 'label_upserted' unless defined?(LABEL_UPSERTED)
|
@@ -6028,7 +6193,7 @@ module Io
|
|
6028
6193
|
end
|
6029
6194
|
|
6030
6195
|
def subtype_to_hash
|
6031
|
-
raise 'Cannot serialize an instance of event directly - must use one of the specific types: attribute_upserted, attribute_deleted, attribute_upserted_v2, attribute_deleted_v2, catalog_upserted, catalog_deleted, subcatalog_upserted, subcatalog_deleted, catalog_item_upserted, catalog_item_deleted, subcatalog_item_upserted, subcatalog_item_deleted, crossdock_shipment_upserted, rate_deleted, rate_upserted, available_promotions_upserted, available_promotions_deleted, allocation_deleted_v2, allocation_upserted_v2, currency_format_deleted, currency_format_upserted, experience_deleted, experience_upserted, experience_price_book_mapping_deleted, experience_price_book_mapping_upserted, item_margin_deleted, item_margin_upserted, item_sales_margin_deleted, item_sales_margin_upserted, label_format_deleted, label_format_upserted, order_deleted, order_upserted, order_identifier_deleted, order_identifier_upserted, order_identifier_deleted_v2, order_identifier_upserted_v2, pricing_deleted, pricing_upserted, fraud_status_changed, tier_upserted, tier_deleted, delivery_option_upserted, delivery_option_deleted, hs6_code_upserted, hs6_code_deleted, hs10_code_upserted, hs10_code_deleted, item_origin_upserted, item_origin_deleted, harmonized_item_upserted, harmonized_item_deleted, harmonized_landed_cost_upserted, fully_harmonized_item_upserted, rule_upserted, rule_deleted, snapshot_upserted, snapshot_deleted, label_upserted, notification_upserted, notification_deleted, manifested_label_upserted, manifested_label_deleted, local_item_upserted, local_item_deleted, membership_upserted, membership_deleted, organization_upserted, organization_deleted, authorization_upserted, authorization_deleted, authorization_deleted_v2, authorization_status_changed, card_authorization_upserted, card_authorization_upserted_v2, online_authorization_upserted, online_authorization_upserted_v2, capture_upserted, capture_upserted_v2, card_upserted, card_upserted_v2, card_deleted, payment_upserted, payment_deleted, refund_upserted, refund_upserted_v2, refund_capture_upserted_v2, reversal_upserted, price_book_upserted, price_book_deleted, price_book_item_upserted, price_book_item_deleted, organization_rates_published, organization_countries_published, organization_ratecard_transit_windows_published, return_upserted, return_deleted, targeting_item_upserted, targeting_item_deleted, tracking_label_event_upserted'
|
6196
|
+
raise 'Cannot serialize an instance of event directly - must use one of the specific types: attribute_upserted, attribute_deleted, attribute_upserted_v2, attribute_deleted_v2, catalog_upserted, catalog_deleted, subcatalog_upserted, subcatalog_deleted, catalog_item_upserted, catalog_item_deleted, subcatalog_item_upserted, subcatalog_item_deleted, crossdock_shipment_upserted, rate_deleted, rate_upserted, available_promotions_upserted, available_promotions_deleted, allocation_deleted_v2, allocation_upserted_v2, currency_format_deleted, currency_format_upserted, experience_deleted, experience_upserted, experience_price_book_mapping_deleted, experience_price_book_mapping_upserted, item_margin_deleted, item_margin_upserted, item_sales_margin_deleted, item_sales_margin_upserted, label_format_deleted, label_format_upserted, order_deleted, order_upserted, order_identifier_deleted, order_identifier_upserted, order_identifier_deleted_v2, order_identifier_upserted_v2, pricing_deleted, pricing_upserted, fraud_status_changed, tier_upserted, tier_deleted, delivery_option_upserted, delivery_option_deleted, hs6_code_upserted, hs6_code_deleted, hs10_code_upserted, hs10_code_deleted, item_origin_upserted, item_origin_deleted, harmonized_item_upserted, harmonized_item_deleted, harmonized_landed_cost_upserted, fully_harmonized_item_upserted, rule_upserted, rule_deleted, serial_upserted, serial_deleted, snapshot_upserted, snapshot_deleted, label_upserted, notification_upserted, notification_deleted, manifested_label_upserted, manifested_label_deleted, local_item_upserted, local_item_deleted, membership_upserted, membership_deleted, organization_upserted, organization_deleted, authorization_upserted, authorization_deleted, authorization_deleted_v2, authorization_status_changed, card_authorization_upserted, card_authorization_upserted_v2, online_authorization_upserted, online_authorization_upserted_v2, capture_upserted, capture_upserted_v2, card_upserted, card_upserted_v2, card_deleted, payment_upserted, payment_deleted, refund_upserted, refund_upserted_v2, refund_capture_upserted_v2, reversal_upserted, price_book_upserted, price_book_deleted, price_book_item_upserted, price_book_item_deleted, organization_rates_published, organization_countries_published, organization_ratecard_transit_windows_published, return_upserted, return_deleted, targeting_item_upserted, targeting_item_deleted, tracking_label_event_upserted'
|
6032
6197
|
end
|
6033
6198
|
|
6034
6199
|
def to_hash
|
@@ -6098,6 +6263,8 @@ module Io
|
|
6098
6263
|
when Types::FULLY_HARMONIZED_ITEM_UPSERTED; FullyHarmonizedItemUpserted.new(hash)
|
6099
6264
|
when Types::RULE_UPSERTED; RuleUpserted.new(hash)
|
6100
6265
|
when Types::RULE_DELETED; RuleDeleted.new(hash)
|
6266
|
+
when Types::SERIAL_UPSERTED; SerialUpserted.new(hash)
|
6267
|
+
when Types::SERIAL_DELETED; SerialDeleted.new(hash)
|
6101
6268
|
when Types::SNAPSHOT_UPSERTED; SnapshotUpserted.new(hash)
|
6102
6269
|
when Types::SNAPSHOT_DELETED; SnapshotDeleted.new(hash)
|
6103
6270
|
when Types::LABEL_UPSERTED; LabelUpserted.new(hash)
|
@@ -6687,6 +6854,7 @@ module Io
|
|
6687
6854
|
ORDER_EXPORT_TYPE = 'order_export_type' unless defined?(ORDER_EXPORT_TYPE)
|
6688
6855
|
SOLIDUS_PRODUCT_EXPORT_TYPE = 'solidus_product_export_type' unless defined?(SOLIDUS_PRODUCT_EXPORT_TYPE)
|
6689
6856
|
SOLIDUS_VARIANT_EXPORT_TYPE = 'solidus_variant_export_type' unless defined?(SOLIDUS_VARIANT_EXPORT_TYPE)
|
6857
|
+
LOCALIZED_ITEM_PRICES_EXPORT_TYPE = 'localized_item_prices_export_type' unless defined?(LOCALIZED_ITEM_PRICES_EXPORT_TYPE)
|
6690
6858
|
end
|
6691
6859
|
|
6692
6860
|
attr_reader :discriminator
|
@@ -6698,7 +6866,7 @@ module Io
|
|
6698
6866
|
end
|
6699
6867
|
|
6700
6868
|
def subtype_to_hash
|
6701
|
-
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, unharmonized_item_export_type, order_export_type, solidus_product_export_type, solidus_variant_export_type'
|
6869
|
+
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, unharmonized_item_export_type, order_export_type, solidus_product_export_type, solidus_variant_export_type, localized_item_prices_export_type'
|
6702
6870
|
end
|
6703
6871
|
|
6704
6872
|
def to_hash
|
@@ -6722,6 +6890,7 @@ module Io
|
|
6722
6890
|
when Types::ORDER_EXPORT_TYPE; OrderExportType.new(hash)
|
6723
6891
|
when Types::SOLIDUS_PRODUCT_EXPORT_TYPE; SolidusProductExportType.new(hash)
|
6724
6892
|
when Types::SOLIDUS_VARIANT_EXPORT_TYPE; SolidusVariantExportType.new(hash)
|
6893
|
+
when Types::LOCALIZED_ITEM_PRICES_EXPORT_TYPE; LocalizedItemPricesExportType.new(hash)
|
6725
6894
|
else ExportTypeUndefinedType.new(:discriminator => discriminator)
|
6726
6895
|
end
|
6727
6896
|
end
|
@@ -7939,6 +8108,48 @@ module Io
|
|
7939
8108
|
|
7940
8109
|
end
|
7941
8110
|
|
8111
|
+
class Aggregate
|
8112
|
+
|
8113
|
+
attr_reader :value
|
8114
|
+
|
8115
|
+
def initialize(value)
|
8116
|
+
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
8117
|
+
end
|
8118
|
+
|
8119
|
+
# Returns the instance of Aggregate for this value, creating a new instance for an unknown value
|
8120
|
+
def Aggregate.apply(value)
|
8121
|
+
if value.instance_of?(Aggregate)
|
8122
|
+
value
|
8123
|
+
else
|
8124
|
+
HttpClient::Preconditions.assert_class_or_nil('value', value, String)
|
8125
|
+
value.nil? ? nil : (from_string(value) || Aggregate.new(value))
|
8126
|
+
end
|
8127
|
+
end
|
8128
|
+
|
8129
|
+
# Returns the instance of Aggregate for this value, or nil if not found
|
8130
|
+
def Aggregate.from_string(value)
|
8131
|
+
HttpClient::Preconditions.assert_class('value', value, String)
|
8132
|
+
Aggregate.ALL.find { |v| v.value == value }
|
8133
|
+
end
|
8134
|
+
|
8135
|
+
def Aggregate.ALL
|
8136
|
+
@@all ||= [Aggregate.maximum, Aggregate.minimum]
|
8137
|
+
end
|
8138
|
+
|
8139
|
+
def Aggregate.maximum
|
8140
|
+
@@_maximum ||= Aggregate.new('maximum')
|
8141
|
+
end
|
8142
|
+
|
8143
|
+
def Aggregate.minimum
|
8144
|
+
@@_minimum ||= Aggregate.new('minimum')
|
8145
|
+
end
|
8146
|
+
|
8147
|
+
def to_hash
|
8148
|
+
value
|
8149
|
+
end
|
8150
|
+
|
8151
|
+
end
|
8152
|
+
|
7942
8153
|
class AttributeDataType
|
7943
8154
|
|
7944
8155
|
attr_reader :value
|
@@ -9364,7 +9575,7 @@ module Io
|
|
9364
9575
|
end
|
9365
9576
|
|
9366
9577
|
def EventType.ALL
|
9367
|
-
@@all ||= [EventType.attribute_upserted, EventType.attribute_deleted, EventType.attribute_upserted_v2, EventType.attribute_deleted_v2, 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.crossdock_shipment_upserted, EventType.rate_deleted, EventType.rate_upserted, EventType.available_promotions_upserted, EventType.available_promotions_deleted, EventType.allocation_deleted_v2, EventType.allocation_upserted_v2, EventType.currency_format_deleted, EventType.currency_format_upserted, EventType.experience_deleted, EventType.experience_upserted, EventType.experience_price_book_mapping_deleted, EventType.experience_price_book_mapping_upserted, EventType.item_margin_deleted, EventType.item_margin_upserted, EventType.item_sales_margin_deleted, EventType.item_sales_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.order_identifier_deleted_v2, EventType.order_identifier_upserted_v2, EventType.pricing_deleted, EventType.pricing_upserted, EventType.fraud_status_changed, EventType.tier_upserted, EventType.tier_deleted, EventType.delivery_option_upserted, EventType.delivery_option_deleted, 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.harmonized_landed_cost_upserted, EventType.fully_harmonized_item_upserted, EventType.rule_upserted, EventType.rule_deleted, EventType.snapshot_upserted, EventType.snapshot_deleted, EventType.label_upserted, EventType.notification_upserted, EventType.notification_deleted, EventType.manifested_label_upserted, EventType.manifested_label_deleted, EventType.local_item_upserted, EventType.local_item_deleted, EventType.membership_upserted, EventType.membership_deleted, EventType.organization_upserted, EventType.organization_deleted, EventType.authorization_upserted, EventType.authorization_deleted, EventType.authorization_deleted_v2, EventType.authorization_status_changed, EventType.card_authorization_upserted, EventType.card_authorization_upserted_v2, EventType.online_authorization_upserted, EventType.online_authorization_upserted_v2, EventType.capture_upserted, EventType.capture_upserted_v2, EventType.card_upserted, EventType.card_upserted_v2, EventType.card_deleted, EventType.payment_upserted, EventType.payment_deleted, EventType.refund_upserted, EventType.refund_upserted_v2, EventType.refund_capture_upserted_v2, EventType.reversal_upserted, EventType.price_book_upserted, EventType.price_book_deleted, EventType.price_book_item_upserted, EventType.price_book_item_deleted, EventType.organization_rates_published, EventType.organization_countries_published, EventType.organization_ratecard_transit_windows_published, EventType.return_upserted, EventType.return_deleted, EventType.targeting_item_upserted, EventType.targeting_item_deleted, EventType.tracking_label_event_upserted]
|
9578
|
+
@@all ||= [EventType.attribute_upserted, EventType.attribute_deleted, EventType.attribute_upserted_v2, EventType.attribute_deleted_v2, 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.crossdock_shipment_upserted, EventType.rate_deleted, EventType.rate_upserted, EventType.available_promotions_upserted, EventType.available_promotions_deleted, EventType.allocation_deleted_v2, EventType.allocation_upserted_v2, EventType.currency_format_deleted, EventType.currency_format_upserted, EventType.experience_deleted, EventType.experience_upserted, EventType.experience_price_book_mapping_deleted, EventType.experience_price_book_mapping_upserted, EventType.item_margin_deleted, EventType.item_margin_upserted, EventType.item_sales_margin_deleted, EventType.item_sales_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.order_identifier_deleted_v2, EventType.order_identifier_upserted_v2, EventType.pricing_deleted, EventType.pricing_upserted, EventType.fraud_status_changed, EventType.tier_upserted, EventType.tier_deleted, EventType.delivery_option_upserted, EventType.delivery_option_deleted, 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.harmonized_landed_cost_upserted, EventType.fully_harmonized_item_upserted, EventType.rule_upserted, EventType.rule_deleted, EventType.serial_upserted, EventType.serial_deleted, EventType.snapshot_upserted, EventType.snapshot_deleted, EventType.label_upserted, EventType.notification_upserted, EventType.notification_deleted, EventType.manifested_label_upserted, EventType.manifested_label_deleted, EventType.local_item_upserted, EventType.local_item_deleted, EventType.membership_upserted, EventType.membership_deleted, EventType.organization_upserted, EventType.organization_deleted, EventType.authorization_upserted, EventType.authorization_deleted, EventType.authorization_deleted_v2, EventType.authorization_status_changed, EventType.card_authorization_upserted, EventType.card_authorization_upserted_v2, EventType.online_authorization_upserted, EventType.online_authorization_upserted_v2, EventType.capture_upserted, EventType.capture_upserted_v2, EventType.card_upserted, EventType.card_upserted_v2, EventType.card_deleted, EventType.payment_upserted, EventType.payment_deleted, EventType.refund_upserted, EventType.refund_upserted_v2, EventType.refund_capture_upserted_v2, EventType.reversal_upserted, EventType.price_book_upserted, EventType.price_book_deleted, EventType.price_book_item_upserted, EventType.price_book_item_deleted, EventType.organization_rates_published, EventType.organization_countries_published, EventType.organization_ratecard_transit_windows_published, EventType.return_upserted, EventType.return_deleted, EventType.targeting_item_upserted, EventType.targeting_item_deleted, EventType.tracking_label_event_upserted]
|
9368
9579
|
end
|
9369
9580
|
|
9370
9581
|
def EventType.attribute_upserted
|
@@ -9591,6 +9802,14 @@ module Io
|
|
9591
9802
|
@@_rule_deleted ||= EventType.new('rule_deleted')
|
9592
9803
|
end
|
9593
9804
|
|
9805
|
+
def EventType.serial_upserted
|
9806
|
+
@@_serial_upserted ||= EventType.new('serial_upserted')
|
9807
|
+
end
|
9808
|
+
|
9809
|
+
def EventType.serial_deleted
|
9810
|
+
@@_serial_deleted ||= EventType.new('serial_deleted')
|
9811
|
+
end
|
9812
|
+
|
9594
9813
|
def EventType.snapshot_upserted
|
9595
9814
|
@@_snapshot_upserted ||= EventType.new('snapshot_upserted')
|
9596
9815
|
end
|
@@ -12509,6 +12728,52 @@ module Io
|
|
12509
12728
|
|
12510
12729
|
end
|
12511
12730
|
|
12731
|
+
class SerialStatus
|
12732
|
+
|
12733
|
+
attr_reader :value
|
12734
|
+
|
12735
|
+
def initialize(value)
|
12736
|
+
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
12737
|
+
end
|
12738
|
+
|
12739
|
+
# Returns the instance of SerialStatus for this value, creating a new instance for an unknown value
|
12740
|
+
def SerialStatus.apply(value)
|
12741
|
+
if value.instance_of?(SerialStatus)
|
12742
|
+
value
|
12743
|
+
else
|
12744
|
+
HttpClient::Preconditions.assert_class_or_nil('value', value, String)
|
12745
|
+
value.nil? ? nil : (from_string(value) || SerialStatus.new(value))
|
12746
|
+
end
|
12747
|
+
end
|
12748
|
+
|
12749
|
+
# Returns the instance of SerialStatus for this value, or nil if not found
|
12750
|
+
def SerialStatus.from_string(value)
|
12751
|
+
HttpClient::Preconditions.assert_class('value', value, String)
|
12752
|
+
SerialStatus.ALL.find { |v| v.value == value }
|
12753
|
+
end
|
12754
|
+
|
12755
|
+
def SerialStatus.ALL
|
12756
|
+
@@all ||= [SerialStatus.available, SerialStatus.reserved, SerialStatus.sold]
|
12757
|
+
end
|
12758
|
+
|
12759
|
+
def SerialStatus.available
|
12760
|
+
@@_available ||= SerialStatus.new('available')
|
12761
|
+
end
|
12762
|
+
|
12763
|
+
def SerialStatus.reserved
|
12764
|
+
@@_reserved ||= SerialStatus.new('reserved')
|
12765
|
+
end
|
12766
|
+
|
12767
|
+
def SerialStatus.sold
|
12768
|
+
@@_sold ||= SerialStatus.new('sold')
|
12769
|
+
end
|
12770
|
+
|
12771
|
+
def to_hash
|
12772
|
+
value
|
12773
|
+
end
|
12774
|
+
|
12775
|
+
end
|
12776
|
+
|
12512
12777
|
class ShipmentIntegrationType
|
12513
12778
|
|
12514
12779
|
attr_reader :value
|
@@ -12609,6 +12874,60 @@ module Io
|
|
12609
12874
|
|
12610
12875
|
end
|
12611
12876
|
|
12877
|
+
class ShopifyGrant
|
12878
|
+
|
12879
|
+
attr_reader :value
|
12880
|
+
|
12881
|
+
def initialize(value)
|
12882
|
+
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
12883
|
+
end
|
12884
|
+
|
12885
|
+
# Returns the instance of ShopifyGrant for this value, creating a new instance for an unknown value
|
12886
|
+
def ShopifyGrant.apply(value)
|
12887
|
+
if value.instance_of?(ShopifyGrant)
|
12888
|
+
value
|
12889
|
+
else
|
12890
|
+
HttpClient::Preconditions.assert_class_or_nil('value', value, String)
|
12891
|
+
value.nil? ? nil : (from_string(value) || ShopifyGrant.new(value))
|
12892
|
+
end
|
12893
|
+
end
|
12894
|
+
|
12895
|
+
# Returns the instance of ShopifyGrant for this value, or nil if not found
|
12896
|
+
def ShopifyGrant.from_string(value)
|
12897
|
+
HttpClient::Preconditions.assert_class('value', value, String)
|
12898
|
+
ShopifyGrant.ALL.find { |v| v.value == value }
|
12899
|
+
end
|
12900
|
+
|
12901
|
+
def ShopifyGrant.ALL
|
12902
|
+
@@all ||= [ShopifyGrant.discount, ShopifyGrant.gift_card, ShopifyGrant.metafield, ShopifyGrant.order]
|
12903
|
+
end
|
12904
|
+
|
12905
|
+
# Access to /admin/price_rules/:id/discount_codes.json
|
12906
|
+
def ShopifyGrant.discount
|
12907
|
+
@@_discount ||= ShopifyGrant.new('discount')
|
12908
|
+
end
|
12909
|
+
|
12910
|
+
# Access to /admin/gift_cards.json
|
12911
|
+
def ShopifyGrant.gift_card
|
12912
|
+
@@_gift_card ||= ShopifyGrant.new('gift_card')
|
12913
|
+
end
|
12914
|
+
|
12915
|
+
# Access to /admin/variants/:id/metafields.json
|
12916
|
+
def ShopifyGrant.metafield
|
12917
|
+
@@_metafield ||= ShopifyGrant.new('metafield')
|
12918
|
+
end
|
12919
|
+
|
12920
|
+
# Access to /admin/orders/:id/metafields.json
|
12921
|
+
def ShopifyGrant.order
|
12922
|
+
@@_order ||= ShopifyGrant.new('order')
|
12923
|
+
end
|
12924
|
+
|
12925
|
+
def to_hash
|
12926
|
+
value
|
12927
|
+
end
|
12928
|
+
|
12929
|
+
end
|
12930
|
+
|
12612
12931
|
class SortDirection
|
12613
12932
|
|
12614
12933
|
attr_reader :value
|
@@ -16376,7 +16695,7 @@ module Io
|
|
16376
16695
|
# Represents a facility capable of fulfilling a shipment
|
16377
16696
|
class Center
|
16378
16697
|
|
16379
|
-
attr_reader :id, :key, :address, :packaging, :name, :services, :schedule, :timezone, :capabilities, :
|
16698
|
+
attr_reader :id, :key, :address, :packaging, :name, :services, :schedule, :timezone, :capabilities, :partner_center
|
16380
16699
|
|
16381
16700
|
def initialize(incoming={})
|
16382
16701
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
@@ -16390,7 +16709,7 @@ module Io
|
|
16390
16709
|
@schedule = (x = opts.delete(:schedule); x.is_a?(::Io::Flow::V0::Models::Schedule) ? x : ::Io::Flow::V0::Models::Schedule.new(x))
|
16391
16710
|
@timezone = HttpClient::Preconditions.assert_class('timezone', opts.delete(:timezone), String)
|
16392
16711
|
@capabilities = (x = opts.delete(:capabilities); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::CenterCapabilities) ? x : ::Io::Flow::V0::Models::CenterCapabilities.new(x)))
|
16393
|
-
@
|
16712
|
+
@partner_center = (x = opts.delete(:partner_center); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::PartnerCenter) ? x : ::Io::Flow::V0::Models::PartnerCenter.new(x)))
|
16394
16713
|
end
|
16395
16714
|
|
16396
16715
|
def to_json
|
@@ -16412,7 +16731,7 @@ module Io
|
|
16412
16731
|
:schedule => schedule.to_hash,
|
16413
16732
|
:timezone => timezone,
|
16414
16733
|
:capabilities => capabilities.nil? ? nil : capabilities.to_hash,
|
16415
|
-
:
|
16734
|
+
:partner_center => partner_center.nil? ? nil : partner_center.to_hash
|
16416
16735
|
}
|
16417
16736
|
end
|
16418
16737
|
|
@@ -16454,7 +16773,7 @@ module Io
|
|
16454
16773
|
|
16455
16774
|
class CenterForm
|
16456
16775
|
|
16457
|
-
attr_reader :address, :packaging, :name, :services, :schedule, :timezone, :key, :capabilities, :
|
16776
|
+
attr_reader :address, :packaging, :name, :services, :schedule, :timezone, :key, :capabilities, :partner_center_form
|
16458
16777
|
|
16459
16778
|
def initialize(incoming={})
|
16460
16779
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
@@ -16467,7 +16786,7 @@ module Io
|
|
16467
16786
|
@timezone = (x = opts.delete(:timezone); x.nil? ? nil : HttpClient::Preconditions.assert_class('timezone', x, String))
|
16468
16787
|
@key = (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, String))
|
16469
16788
|
@capabilities = (x = opts.delete(:capabilities); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::CenterCapabilities) ? x : ::Io::Flow::V0::Models::CenterCapabilities.new(x)))
|
16470
|
-
@
|
16789
|
+
@partner_center_form = (x = opts.delete(:partner_center_form); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::PartnerCenterForm) ? x : ::Io::Flow::V0::Models::PartnerCenterForm.new(x)))
|
16471
16790
|
end
|
16472
16791
|
|
16473
16792
|
def to_json
|
@@ -16488,7 +16807,7 @@ module Io
|
|
16488
16807
|
:timezone => timezone,
|
16489
16808
|
:key => key,
|
16490
16809
|
:capabilities => capabilities.nil? ? nil : capabilities.to_hash,
|
16491
|
-
:
|
16810
|
+
:partner_center_form => partner_center_form.nil? ? nil : partner_center_form.to_hash
|
16492
16811
|
}
|
16493
16812
|
end
|
16494
16813
|
|
@@ -17339,7 +17658,7 @@ module Io
|
|
17339
17658
|
@window = (x = opts.delete(:window); x.is_a?(::Io::Flow::V0::Models::DeliveryWindow) ? x : ::Io::Flow::V0::Models::DeliveryWindow.new(x))
|
17340
17659
|
@rule_outcome = (x = opts.delete(:rule_outcome); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::TierRuleOutcome) ? x : ::Io::Flow::V0::Models::TierRuleOutcome.from_json(x)))
|
17341
17660
|
@weight = (x = opts.delete(:weight); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::OptionWeightEstimates) ? x : ::Io::Flow::V0::Models::OptionWeightEstimates.new(x)))
|
17342
|
-
@send_to = (x = opts.delete(:send_to); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::
|
17661
|
+
@send_to = (x = opts.delete(:send_to); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ShippingAddress) ? x : ::Io::Flow::V0::Models::ShippingAddress.new(x)))
|
17343
17662
|
end
|
17344
17663
|
|
17345
17664
|
def to_json
|
@@ -20209,7 +20528,7 @@ module Io
|
|
20209
20528
|
# items going to a specific destination country
|
20210
20529
|
class HarmonizedLandedCostForm
|
20211
20530
|
|
20212
|
-
attr_reader :address, :item_numbers, :source_address, :order_number, :
|
20531
|
+
attr_reader :address, :item_numbers, :source_address, :order_number, :line_items
|
20213
20532
|
|
20214
20533
|
def initialize(incoming={})
|
20215
20534
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
@@ -20218,7 +20537,7 @@ module Io
|
|
20218
20537
|
@item_numbers = HttpClient::Preconditions.assert_class('item_numbers', opts.delete(:item_numbers), Array).map { |v| HttpClient::Preconditions.assert_class('item_numbers', v, String) }
|
20219
20538
|
@source_address = (x = opts.delete(:source_address); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Address) ? x : ::Io::Flow::V0::Models::Address.new(x)))
|
20220
20539
|
@order_number = (x = opts.delete(:order_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('order_number', x, String))
|
20221
|
-
@
|
20540
|
+
@line_items = (x = opts.delete(:line_items); x.nil? ? nil : HttpClient::Preconditions.assert_class('line_items', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::LineItemForm) ? x : ::Io::Flow::V0::Models::LineItemForm.new(x)) })
|
20222
20541
|
end
|
20223
20542
|
|
20224
20543
|
def to_json
|
@@ -20235,7 +20554,7 @@ module Io
|
|
20235
20554
|
:item_numbers => item_numbers,
|
20236
20555
|
:source_address => source_address.nil? ? nil : source_address.to_hash,
|
20237
20556
|
:order_number => order_number,
|
20238
|
-
:
|
20557
|
+
:line_items => line_items.nil? ? nil : line_items.map { |o| o.to_hash }
|
20239
20558
|
}
|
20240
20559
|
end
|
20241
20560
|
|
@@ -22412,6 +22731,34 @@ module Io
|
|
22412
22731
|
|
22413
22732
|
end
|
22414
22733
|
|
22734
|
+
class ItemQuerySuggestion
|
22735
|
+
|
22736
|
+
attr_reader :q, :count
|
22737
|
+
|
22738
|
+
def initialize(incoming={})
|
22739
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
22740
|
+
HttpClient::Preconditions.require_keys(opts, [:q], 'ItemQuerySuggestion')
|
22741
|
+
@q = HttpClient::Preconditions.assert_class('q', opts.delete(:q), String)
|
22742
|
+
@count = (x = opts.delete(:count); x.nil? ? nil : HttpClient::Preconditions.assert_class('count', x, Integer))
|
22743
|
+
end
|
22744
|
+
|
22745
|
+
def to_json
|
22746
|
+
JSON.dump(to_hash)
|
22747
|
+
end
|
22748
|
+
|
22749
|
+
def copy(incoming={})
|
22750
|
+
ItemQuerySuggestion.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
22751
|
+
end
|
22752
|
+
|
22753
|
+
def to_hash
|
22754
|
+
{
|
22755
|
+
:q => q,
|
22756
|
+
:count => count
|
22757
|
+
}
|
22758
|
+
end
|
22759
|
+
|
22760
|
+
end
|
22761
|
+
|
22415
22762
|
class ItemSalesMarginDeleted < Event
|
22416
22763
|
|
22417
22764
|
attr_reader :event_id, :timestamp, :item_sales_margin_id, :organization_id, :experience_key
|
@@ -23366,6 +23713,33 @@ module Io
|
|
23366
23713
|
|
23367
23714
|
end
|
23368
23715
|
|
23716
|
+
# Exports localized item prices data
|
23717
|
+
class LocalizedItemPricesExportType < ExportType
|
23718
|
+
|
23719
|
+
attr_reader :since
|
23720
|
+
|
23721
|
+
def initialize(incoming={})
|
23722
|
+
super(:discriminator => ExportType::Types::LOCALIZED_ITEM_PRICES_EXPORT_TYPE)
|
23723
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
23724
|
+
@since = (x = opts.delete(:since); x.nil? ? nil : HttpClient::Preconditions.assert_class('since', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
|
23725
|
+
end
|
23726
|
+
|
23727
|
+
def to_json
|
23728
|
+
JSON.dump(to_hash)
|
23729
|
+
end
|
23730
|
+
|
23731
|
+
def copy(incoming={})
|
23732
|
+
LocalizedItemPricesExportType.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
23733
|
+
end
|
23734
|
+
|
23735
|
+
def subtype_to_hash
|
23736
|
+
{
|
23737
|
+
:since => since
|
23738
|
+
}
|
23739
|
+
end
|
23740
|
+
|
23741
|
+
end
|
23742
|
+
|
23369
23743
|
class LocalizedItemVat < LocalizedPrice
|
23370
23744
|
|
23371
23745
|
attr_reader :currency, :amount, :label, :base, :name, :adjustment
|
@@ -23515,6 +23889,35 @@ module Io
|
|
23515
23889
|
|
23516
23890
|
end
|
23517
23891
|
|
23892
|
+
# Localized translation of a given province/region/country
|
23893
|
+
class LocalizedTranslation
|
23894
|
+
|
23895
|
+
attr_reader :locale, :name
|
23896
|
+
|
23897
|
+
def initialize(incoming={})
|
23898
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
23899
|
+
HttpClient::Preconditions.require_keys(opts, [:locale, :name], 'LocalizedTranslation')
|
23900
|
+
@locale = (x = opts.delete(:locale); x.is_a?(::Io::Flow::V0::Models::Locale) ? x : ::Io::Flow::V0::Models::Locale.new(x))
|
23901
|
+
@name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
|
23902
|
+
end
|
23903
|
+
|
23904
|
+
def to_json
|
23905
|
+
JSON.dump(to_hash)
|
23906
|
+
end
|
23907
|
+
|
23908
|
+
def copy(incoming={})
|
23909
|
+
LocalizedTranslation.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
23910
|
+
end
|
23911
|
+
|
23912
|
+
def to_hash
|
23913
|
+
{
|
23914
|
+
:locale => locale.to_hash,
|
23915
|
+
:name => name
|
23916
|
+
}
|
23917
|
+
end
|
23918
|
+
|
23919
|
+
end
|
23920
|
+
|
23518
23921
|
# Represents closeout of a group of labels that have been transfered to the
|
23519
23922
|
# carrier for shipping
|
23520
23923
|
class Manifest
|
@@ -24450,7 +24853,7 @@ module Io
|
|
24450
24853
|
# payment authorization for an order.
|
24451
24854
|
class Order < ExpandableOrder
|
24452
24855
|
|
24453
|
-
attr_reader :id, :number, :experience, :customer, :delivered_duty, :destination, :expires_at, :items, :deliveries, :selections, :prices, :total, :attributes, :submitted_at, :lines, :identifiers, :promotions, :payments, :balance
|
24856
|
+
attr_reader :id, :number, :experience, :customer, :delivered_duty, :destination, :expires_at, :items, :deliveries, :selections, :prices, :total, :attributes, :submitted_at, :lines, :identifiers, :promotions, :payments, :balance, :rules
|
24454
24857
|
|
24455
24858
|
def initialize(incoming={})
|
24456
24859
|
super(:discriminator => ExpandableOrder::Types::ORDER)
|
@@ -24475,6 +24878,7 @@ module Io
|
|
24475
24878
|
@promotions = (x = opts.delete(:promotions); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Promotions) ? x : ::Io::Flow::V0::Models::Promotions.new(x)))
|
24476
24879
|
@payments = (x = opts.delete(:payments); x.nil? ? nil : HttpClient::Preconditions.assert_class('payments', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::OrderPayment) ? x : ::Io::Flow::V0::Models::OrderPayment.new(x)) })
|
24477
24880
|
@balance = (x = opts.delete(:balance); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::LocalizedTotal) ? x : ::Io::Flow::V0::Models::LocalizedTotal.new(x)))
|
24881
|
+
@rules = (x = opts.delete(:rules); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::OrderRulesSummary) ? x : ::Io::Flow::V0::Models::OrderRulesSummary.new(x)))
|
24478
24882
|
end
|
24479
24883
|
|
24480
24884
|
def to_json
|
@@ -24505,7 +24909,8 @@ module Io
|
|
24505
24909
|
:identifiers => identifiers.nil? ? nil : identifiers,
|
24506
24910
|
:promotions => promotions.nil? ? nil : promotions.to_hash,
|
24507
24911
|
:payments => payments.nil? ? nil : payments.map { |o| o.to_hash },
|
24508
|
-
:balance => balance.nil? ? nil : balance.to_hash
|
24912
|
+
:balance => balance.nil? ? nil : balance.to_hash,
|
24913
|
+
:rules => rules.nil? ? nil : rules.to_hash
|
24509
24914
|
}
|
24510
24915
|
end
|
24511
24916
|
|
@@ -24666,6 +25071,34 @@ module Io
|
|
24666
25071
|
|
24667
25072
|
end
|
24668
25073
|
|
25074
|
+
# Purpose-built form specifically for only address-related changes to
|
25075
|
+
# destination on an order
|
25076
|
+
class OrderDestinationPutForm
|
25077
|
+
|
25078
|
+
attr_reader :destination
|
25079
|
+
|
25080
|
+
def initialize(incoming={})
|
25081
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
25082
|
+
HttpClient::Preconditions.require_keys(opts, [:destination], 'OrderDestinationPutForm')
|
25083
|
+
@destination = (x = opts.delete(:destination); x.is_a?(::Io::Flow::V0::Models::OrderAddress) ? x : ::Io::Flow::V0::Models::OrderAddress.new(x))
|
25084
|
+
end
|
25085
|
+
|
25086
|
+
def to_json
|
25087
|
+
JSON.dump(to_hash)
|
25088
|
+
end
|
25089
|
+
|
25090
|
+
def copy(incoming={})
|
25091
|
+
OrderDestinationPutForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
25092
|
+
end
|
25093
|
+
|
25094
|
+
def to_hash
|
25095
|
+
{
|
25096
|
+
:destination => destination.to_hash
|
25097
|
+
}
|
25098
|
+
end
|
25099
|
+
|
25100
|
+
end
|
25101
|
+
|
24669
25102
|
class OrderError
|
24670
25103
|
|
24671
25104
|
attr_reader :code, :messages, :numbers, :destination_country, :threshold
|
@@ -25367,6 +25800,60 @@ module Io
|
|
25367
25800
|
|
25368
25801
|
end
|
25369
25802
|
|
25803
|
+
class OrderRuleReference
|
25804
|
+
|
25805
|
+
attr_reader :id, :key
|
25806
|
+
|
25807
|
+
def initialize(incoming={})
|
25808
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
25809
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :key], 'OrderRuleReference')
|
25810
|
+
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
25811
|
+
@key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
|
25812
|
+
end
|
25813
|
+
|
25814
|
+
def to_json
|
25815
|
+
JSON.dump(to_hash)
|
25816
|
+
end
|
25817
|
+
|
25818
|
+
def copy(incoming={})
|
25819
|
+
OrderRuleReference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
25820
|
+
end
|
25821
|
+
|
25822
|
+
def to_hash
|
25823
|
+
{
|
25824
|
+
:id => id,
|
25825
|
+
:key => key
|
25826
|
+
}
|
25827
|
+
end
|
25828
|
+
|
25829
|
+
end
|
25830
|
+
|
25831
|
+
class OrderRulesSummary
|
25832
|
+
|
25833
|
+
attr_reader :applied
|
25834
|
+
|
25835
|
+
def initialize(incoming={})
|
25836
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
25837
|
+
HttpClient::Preconditions.require_keys(opts, [:applied], 'OrderRulesSummary')
|
25838
|
+
@applied = HttpClient::Preconditions.assert_class('applied', opts.delete(:applied), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::OrderRuleReference) ? x : ::Io::Flow::V0::Models::OrderRuleReference.new(x)) }
|
25839
|
+
end
|
25840
|
+
|
25841
|
+
def to_json
|
25842
|
+
JSON.dump(to_hash)
|
25843
|
+
end
|
25844
|
+
|
25845
|
+
def copy(incoming={})
|
25846
|
+
OrderRulesSummary.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
25847
|
+
end
|
25848
|
+
|
25849
|
+
def to_hash
|
25850
|
+
{
|
25851
|
+
:applied => applied.map { |o| o.to_hash }
|
25852
|
+
}
|
25853
|
+
end
|
25854
|
+
|
25855
|
+
end
|
25856
|
+
|
25370
25857
|
class OrderUpserted < Event
|
25371
25858
|
|
25372
25859
|
attr_reader :event_id, :timestamp, :organization, :number, :environment, :experience_id, :expires_at, :customer, :selections, :items, :destination, :deliveries, :prices, :payments, :discount, :delivered_duty, :total, :created_at, :updated_at, :submitted_at, :lines, :attributes
|
@@ -26380,6 +26867,62 @@ module Io
|
|
26380
26867
|
|
26381
26868
|
end
|
26382
26869
|
|
26870
|
+
class PartnerCenter
|
26871
|
+
|
26872
|
+
attr_reader :partner_reference, :number
|
26873
|
+
|
26874
|
+
def initialize(incoming={})
|
26875
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
26876
|
+
HttpClient::Preconditions.require_keys(opts, [:partner_reference], 'PartnerCenter')
|
26877
|
+
@partner_reference = (x = opts.delete(:partner_reference); x.is_a?(::Io::Flow::V0::Models::PartnerReference) ? x : ::Io::Flow::V0::Models::PartnerReference.new(x))
|
26878
|
+
@number = (x = opts.delete(:number); x.nil? ? nil : HttpClient::Preconditions.assert_class('number', x, String))
|
26879
|
+
end
|
26880
|
+
|
26881
|
+
def to_json
|
26882
|
+
JSON.dump(to_hash)
|
26883
|
+
end
|
26884
|
+
|
26885
|
+
def copy(incoming={})
|
26886
|
+
PartnerCenter.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
26887
|
+
end
|
26888
|
+
|
26889
|
+
def to_hash
|
26890
|
+
{
|
26891
|
+
:partner_reference => partner_reference.to_hash,
|
26892
|
+
:number => number
|
26893
|
+
}
|
26894
|
+
end
|
26895
|
+
|
26896
|
+
end
|
26897
|
+
|
26898
|
+
class PartnerCenterForm
|
26899
|
+
|
26900
|
+
attr_reader :partner_id, :number
|
26901
|
+
|
26902
|
+
def initialize(incoming={})
|
26903
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
26904
|
+
HttpClient::Preconditions.require_keys(opts, [:partner_id], 'PartnerCenterForm')
|
26905
|
+
@partner_id = HttpClient::Preconditions.assert_class('partner_id', opts.delete(:partner_id), String)
|
26906
|
+
@number = (x = opts.delete(:number); x.nil? ? nil : HttpClient::Preconditions.assert_class('number', x, String))
|
26907
|
+
end
|
26908
|
+
|
26909
|
+
def to_json
|
26910
|
+
JSON.dump(to_hash)
|
26911
|
+
end
|
26912
|
+
|
26913
|
+
def copy(incoming={})
|
26914
|
+
PartnerCenterForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
26915
|
+
end
|
26916
|
+
|
26917
|
+
def to_hash
|
26918
|
+
{
|
26919
|
+
:partner_id => partner_id,
|
26920
|
+
:number => number
|
26921
|
+
}
|
26922
|
+
end
|
26923
|
+
|
26924
|
+
end
|
26925
|
+
|
26383
26926
|
class PartnerReference
|
26384
26927
|
|
26385
26928
|
attr_reader :id
|
@@ -28057,7 +28600,7 @@ module Io
|
|
28057
28600
|
# standard for country subdivisions. See https://api.flow.io/reference/provinces
|
28058
28601
|
class Province
|
28059
28602
|
|
28060
|
-
attr_reader :id, :iso_3166_2, :name, :country, :province_type
|
28603
|
+
attr_reader :id, :iso_3166_2, :name, :country, :province_type, :translations
|
28061
28604
|
|
28062
28605
|
def initialize(incoming={})
|
28063
28606
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
@@ -28067,6 +28610,7 @@ module Io
|
|
28067
28610
|
@name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
|
28068
28611
|
@country = HttpClient::Preconditions.assert_class('country', opts.delete(:country), String)
|
28069
28612
|
@province_type = (x = opts.delete(:province_type); x.is_a?(::Io::Flow::V0::Models::ProvinceType) ? x : ::Io::Flow::V0::Models::ProvinceType.apply(x))
|
28613
|
+
@translations = (x = opts.delete(:translations); x.nil? ? nil : HttpClient::Preconditions.assert_class('translations', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::LocalizedTranslation) ? x : ::Io::Flow::V0::Models::LocalizedTranslation.new(x)) })
|
28070
28614
|
end
|
28071
28615
|
|
28072
28616
|
def to_json
|
@@ -28083,7 +28627,8 @@ module Io
|
|
28083
28627
|
:iso_3166_2 => iso_3166_2,
|
28084
28628
|
:name => name,
|
28085
28629
|
:country => country,
|
28086
|
-
:province_type => province_type.value
|
28630
|
+
:province_type => province_type.value,
|
28631
|
+
:translations => translations.nil? ? nil : translations.map { |o| o.to_hash }
|
28087
28632
|
}
|
28088
28633
|
end
|
28089
28634
|
|
@@ -30102,6 +30647,181 @@ module Io
|
|
30102
30647
|
|
30103
30648
|
end
|
30104
30649
|
|
30650
|
+
# A unique identifier assigned to an individual item.
|
30651
|
+
class Serial
|
30652
|
+
|
30653
|
+
attr_reader :id, :number, :item_number, :item_price, :status, :center_key, :attributes
|
30654
|
+
|
30655
|
+
def initialize(incoming={})
|
30656
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
30657
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :number, :item_number, :item_price, :status, :center_key], 'Serial')
|
30658
|
+
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
30659
|
+
@number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
|
30660
|
+
@item_number = HttpClient::Preconditions.assert_class('item_number', opts.delete(:item_number), String)
|
30661
|
+
@item_price = (x = opts.delete(:item_price); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x))
|
30662
|
+
@status = (x = opts.delete(:status); x.is_a?(::Io::Flow::V0::Models::SerialStatus) ? x : ::Io::Flow::V0::Models::SerialStatus.apply(x))
|
30663
|
+
@center_key = HttpClient::Preconditions.assert_class('center_key', opts.delete(:center_key), String)
|
30664
|
+
@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 }
|
30665
|
+
end
|
30666
|
+
|
30667
|
+
def to_json
|
30668
|
+
JSON.dump(to_hash)
|
30669
|
+
end
|
30670
|
+
|
30671
|
+
def copy(incoming={})
|
30672
|
+
Serial.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
30673
|
+
end
|
30674
|
+
|
30675
|
+
def to_hash
|
30676
|
+
{
|
30677
|
+
:id => id,
|
30678
|
+
:number => number,
|
30679
|
+
:item_number => item_number,
|
30680
|
+
:item_price => item_price.to_hash,
|
30681
|
+
:status => status.value,
|
30682
|
+
:center_key => center_key,
|
30683
|
+
:attributes => attributes
|
30684
|
+
}
|
30685
|
+
end
|
30686
|
+
|
30687
|
+
end
|
30688
|
+
|
30689
|
+
class SerialDeleted < Event
|
30690
|
+
|
30691
|
+
attr_reader :event_id, :timestamp, :id
|
30692
|
+
|
30693
|
+
def initialize(incoming={})
|
30694
|
+
super(:discriminator => Event::Types::SERIAL_DELETED)
|
30695
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
30696
|
+
HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :id], 'SerialDeleted')
|
30697
|
+
@event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
|
30698
|
+
@timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
|
30699
|
+
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
30700
|
+
end
|
30701
|
+
|
30702
|
+
def to_json
|
30703
|
+
JSON.dump(to_hash)
|
30704
|
+
end
|
30705
|
+
|
30706
|
+
def copy(incoming={})
|
30707
|
+
SerialDeleted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
30708
|
+
end
|
30709
|
+
|
30710
|
+
def subtype_to_hash
|
30711
|
+
{
|
30712
|
+
:event_id => event_id,
|
30713
|
+
:timestamp => timestamp,
|
30714
|
+
:id => id
|
30715
|
+
}
|
30716
|
+
end
|
30717
|
+
|
30718
|
+
end
|
30719
|
+
|
30720
|
+
# A unique identifier assigned to an individual item.
|
30721
|
+
class SerialForm
|
30722
|
+
|
30723
|
+
attr_reader :number, :item_number, :item_price, :item_currency, :status, :center_key, :attributes
|
30724
|
+
|
30725
|
+
def initialize(incoming={})
|
30726
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
30727
|
+
HttpClient::Preconditions.require_keys(opts, [:number, :item_number, :item_price, :item_currency, :status], 'SerialForm')
|
30728
|
+
@number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
|
30729
|
+
@item_number = HttpClient::Preconditions.assert_class('item_number', opts.delete(:item_number), String)
|
30730
|
+
@item_price = HttpClient::Preconditions.assert_class('item_price', HttpClient::Helper.to_big_decimal(opts.delete(:item_price)), BigDecimal)
|
30731
|
+
@item_currency = HttpClient::Preconditions.assert_class('item_currency', opts.delete(:item_currency), String)
|
30732
|
+
@status = (x = opts.delete(:status); x.is_a?(::Io::Flow::V0::Models::SerialStatus) ? x : ::Io::Flow::V0::Models::SerialStatus.apply(x))
|
30733
|
+
@center_key = (x = opts.delete(:center_key); x.nil? ? nil : HttpClient::Preconditions.assert_class('center_key', x, String))
|
30734
|
+
@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 })
|
30735
|
+
end
|
30736
|
+
|
30737
|
+
def to_json
|
30738
|
+
JSON.dump(to_hash)
|
30739
|
+
end
|
30740
|
+
|
30741
|
+
def copy(incoming={})
|
30742
|
+
SerialForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
30743
|
+
end
|
30744
|
+
|
30745
|
+
def to_hash
|
30746
|
+
{
|
30747
|
+
:number => number,
|
30748
|
+
:item_number => item_number,
|
30749
|
+
:item_price => item_price,
|
30750
|
+
:item_currency => item_currency,
|
30751
|
+
:status => status.value,
|
30752
|
+
:center_key => center_key,
|
30753
|
+
:attributes => attributes.nil? ? nil : attributes
|
30754
|
+
}
|
30755
|
+
end
|
30756
|
+
|
30757
|
+
end
|
30758
|
+
|
30759
|
+
class SerialUpserted < Event
|
30760
|
+
|
30761
|
+
attr_reader :event_id, :timestamp, :organization, :serial
|
30762
|
+
|
30763
|
+
def initialize(incoming={})
|
30764
|
+
super(:discriminator => Event::Types::SERIAL_UPSERTED)
|
30765
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
30766
|
+
HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :serial], 'SerialUpserted')
|
30767
|
+
@event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
|
30768
|
+
@timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
|
30769
|
+
@organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
|
30770
|
+
@serial = (x = opts.delete(:serial); x.is_a?(::Io::Flow::V0::Models::Serial) ? x : ::Io::Flow::V0::Models::Serial.new(x))
|
30771
|
+
end
|
30772
|
+
|
30773
|
+
def to_json
|
30774
|
+
JSON.dump(to_hash)
|
30775
|
+
end
|
30776
|
+
|
30777
|
+
def copy(incoming={})
|
30778
|
+
SerialUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
30779
|
+
end
|
30780
|
+
|
30781
|
+
def subtype_to_hash
|
30782
|
+
{
|
30783
|
+
:event_id => event_id,
|
30784
|
+
:timestamp => timestamp,
|
30785
|
+
:organization => organization,
|
30786
|
+
:serial => serial.to_hash
|
30787
|
+
}
|
30788
|
+
end
|
30789
|
+
|
30790
|
+
end
|
30791
|
+
|
30792
|
+
# Retrieve journaled history of a serial
|
30793
|
+
class SerialVersion
|
30794
|
+
|
30795
|
+
attr_reader :id, :timestamp, :type, :serial
|
30796
|
+
|
30797
|
+
def initialize(incoming={})
|
30798
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
30799
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :timestamp, :type, :serial], 'SerialVersion')
|
30800
|
+
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
30801
|
+
@timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
|
30802
|
+
@type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::ChangeType) ? x : ::Io::Flow::V0::Models::ChangeType.apply(x))
|
30803
|
+
@serial = (x = opts.delete(:serial); x.is_a?(::Io::Flow::V0::Models::Serial) ? x : ::Io::Flow::V0::Models::Serial.new(x))
|
30804
|
+
end
|
30805
|
+
|
30806
|
+
def to_json
|
30807
|
+
JSON.dump(to_hash)
|
30808
|
+
end
|
30809
|
+
|
30810
|
+
def copy(incoming={})
|
30811
|
+
SerialVersion.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
30812
|
+
end
|
30813
|
+
|
30814
|
+
def to_hash
|
30815
|
+
{
|
30816
|
+
:id => id,
|
30817
|
+
:timestamp => timestamp,
|
30818
|
+
:type => type.value,
|
30819
|
+
:serial => serial.to_hash
|
30820
|
+
}
|
30821
|
+
end
|
30822
|
+
|
30823
|
+
end
|
30824
|
+
|
30105
30825
|
class ServiceReference
|
30106
30826
|
|
30107
30827
|
attr_reader :id
|
@@ -30497,13 +31217,14 @@ module Io
|
|
30497
31217
|
|
30498
31218
|
class ShippingAddress
|
30499
31219
|
|
30500
|
-
attr_reader :contact, :location
|
31220
|
+
attr_reader :contact, :location, :center_key
|
30501
31221
|
|
30502
31222
|
def initialize(incoming={})
|
30503
31223
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
30504
31224
|
HttpClient::Preconditions.require_keys(opts, [:contact, :location], 'ShippingAddress')
|
30505
31225
|
@contact = (x = opts.delete(:contact); x.is_a?(::Io::Flow::V0::Models::Contact) ? x : ::Io::Flow::V0::Models::Contact.new(x))
|
30506
31226
|
@location = (x = opts.delete(:location); x.is_a?(::Io::Flow::V0::Models::Address) ? x : ::Io::Flow::V0::Models::Address.new(x))
|
31227
|
+
@center_key = (x = opts.delete(:center_key); x.nil? ? nil : HttpClient::Preconditions.assert_class('center_key', x, String))
|
30507
31228
|
end
|
30508
31229
|
|
30509
31230
|
def to_json
|
@@ -30517,7 +31238,8 @@ module Io
|
|
30517
31238
|
def to_hash
|
30518
31239
|
{
|
30519
31240
|
:contact => contact.to_hash,
|
30520
|
-
:location => location.to_hash
|
31241
|
+
:location => location.to_hash,
|
31242
|
+
:center_key => center_key
|
30521
31243
|
}
|
30522
31244
|
end
|
30523
31245
|
|
@@ -30883,6 +31605,65 @@ module Io
|
|
30883
31605
|
|
30884
31606
|
end
|
30885
31607
|
|
31608
|
+
# Shopify private app information.
|
31609
|
+
class ShopifyPrivateApp
|
31610
|
+
|
31611
|
+
attr_reader :id, :api_key, :password
|
31612
|
+
|
31613
|
+
def initialize(incoming={})
|
31614
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
31615
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :api_key, :password], 'ShopifyPrivateApp')
|
31616
|
+
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
31617
|
+
@api_key = HttpClient::Preconditions.assert_class('api_key', opts.delete(:api_key), String)
|
31618
|
+
@password = HttpClient::Preconditions.assert_class('password', opts.delete(:password), String)
|
31619
|
+
end
|
31620
|
+
|
31621
|
+
def to_json
|
31622
|
+
JSON.dump(to_hash)
|
31623
|
+
end
|
31624
|
+
|
31625
|
+
def copy(incoming={})
|
31626
|
+
ShopifyPrivateApp.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
31627
|
+
end
|
31628
|
+
|
31629
|
+
def to_hash
|
31630
|
+
{
|
31631
|
+
:id => id,
|
31632
|
+
:api_key => api_key,
|
31633
|
+
:password => password
|
31634
|
+
}
|
31635
|
+
end
|
31636
|
+
|
31637
|
+
end
|
31638
|
+
|
31639
|
+
class ShopifyPrivateAppForm
|
31640
|
+
|
31641
|
+
attr_reader :api_key, :password
|
31642
|
+
|
31643
|
+
def initialize(incoming={})
|
31644
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
31645
|
+
HttpClient::Preconditions.require_keys(opts, [:api_key, :password], 'ShopifyPrivateAppForm')
|
31646
|
+
@api_key = HttpClient::Preconditions.assert_class('api_key', opts.delete(:api_key), String)
|
31647
|
+
@password = HttpClient::Preconditions.assert_class('password', opts.delete(:password), String)
|
31648
|
+
end
|
31649
|
+
|
31650
|
+
def to_json
|
31651
|
+
JSON.dump(to_hash)
|
31652
|
+
end
|
31653
|
+
|
31654
|
+
def copy(incoming={})
|
31655
|
+
ShopifyPrivateAppForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
31656
|
+
end
|
31657
|
+
|
31658
|
+
def to_hash
|
31659
|
+
{
|
31660
|
+
:api_key => api_key,
|
31661
|
+
:password => password
|
31662
|
+
}
|
31663
|
+
end
|
31664
|
+
|
31665
|
+
end
|
31666
|
+
|
30886
31667
|
class SnapshotDeleted < Event
|
30887
31668
|
|
30888
31669
|
attr_reader :event_id, :timestamp, :snapshot_id
|
@@ -33813,7 +34594,7 @@ module Io
|
|
33813
34594
|
end
|
33814
34595
|
|
33815
34596
|
def full_uri(path)
|
33816
|
-
File.join(@base_uri.to_s, path)
|
34597
|
+
path.start_with?(@base_uri.to_s) ? path : File.join(@base_uri.to_s, path)
|
33817
34598
|
end
|
33818
34599
|
|
33819
34600
|
# Called to configure SSL if the base uri requires it
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flowcommerce
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.58
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Flow Commerce, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|