flowcommerce 0.2.21 → 0.2.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/flow_commerce/flow_api_v0_client.rb +435 -68
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b24a2aaf4591d550b27c6f24b5a9b255f019893f
|
|
4
|
+
data.tar.gz: f288de1afd0c711175f670b8cbadda5102e64ff6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6307c5cf4fb5d05c80aacc0e1d13f6345efa295b86d81ff6fc024c00b5f106d0ef48973da94c70f8713072ea701b4e65edb4a3b0659d8c3182a20df28b632ff3
|
|
7
|
+
data.tar.gz: 1f986fa66391215571b5e8095199506907281697c809f2c4651f54c690b23be42a336271101a3f7a691b583730c8a4c6233c0eb1ecf0a5945551cb551185e02c
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Generated by
|
|
2
|
-
# Service version: 0.3.
|
|
3
|
-
#
|
|
1
|
+
# Generated by API Builder - https://www.apibuilder.io
|
|
2
|
+
# Service version: 0.3.50
|
|
3
|
+
# apibuilder:0.12.20 https://app.apibuilder.io/flow/api/0.3.50/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 = '
|
|
29
|
-
VERSION = '0.3.
|
|
28
|
+
USER_AGENT = 'apibuilder:0.12.20 https://app.apibuilder.io/flow/api/0.3.50/ruby_client' unless defined?(Constants::USER_AGENT)
|
|
29
|
+
VERSION = '0.3.50' unless defined?(Constants::VERSION)
|
|
30
30
|
VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
|
|
31
31
|
|
|
32
32
|
end
|
|
@@ -3112,6 +3112,7 @@ module Io
|
|
|
3112
3112
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
|
3113
3113
|
query = {
|
|
3114
3114
|
:id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
|
|
3115
|
+
:tier_direction => (x = opts.delete(:tier_direction); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::TierDirection) ? x : ::Io::Flow::V0::Models::TierDirection.apply(x)).value),
|
|
3115
3116
|
:experience => (x = opts.delete(:experience); x.nil? ? nil : HttpClient::Preconditions.assert_class('experience', x, String)),
|
|
3116
3117
|
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
|
3117
3118
|
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
|
@@ -4867,8 +4868,7 @@ module Io
|
|
|
4867
4868
|
|
|
4868
4869
|
def initialize(incoming={})
|
|
4869
4870
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
|
4870
|
-
HttpClient::Preconditions.
|
|
4871
|
-
@discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator), String)
|
|
4871
|
+
@discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator) || 'physical_delivery', String)
|
|
4872
4872
|
end
|
|
4873
4873
|
|
|
4874
4874
|
def subtype_to_hash
|
|
@@ -5094,7 +5094,9 @@ module Io
|
|
|
5094
5094
|
NOTIFICATION_UPSERTED = 'notification_upserted' unless defined?(NOTIFICATION_UPSERTED)
|
|
5095
5095
|
NOTIFICATION_DELETED = 'notification_deleted' unless defined?(NOTIFICATION_DELETED)
|
|
5096
5096
|
LOCALIZED_ITEM_UPSERTED = 'localized_item_upserted' unless defined?(LOCALIZED_ITEM_UPSERTED)
|
|
5097
|
+
LOCALIZED_ITEM_UPSERTED_V2 = 'localized_item_upserted_v2' unless defined?(LOCALIZED_ITEM_UPSERTED_V2)
|
|
5097
5098
|
LOCALIZED_ITEM_DELETED = 'localized_item_deleted' unless defined?(LOCALIZED_ITEM_DELETED)
|
|
5099
|
+
LOCALIZED_ITEM_DELETED_V2 = 'localized_item_deleted_v2' unless defined?(LOCALIZED_ITEM_DELETED_V2)
|
|
5098
5100
|
LOCALIZED_ITEM_SNAPSHOT = 'localized_item_snapshot' unless defined?(LOCALIZED_ITEM_SNAPSHOT)
|
|
5099
5101
|
MEMBERSHIP_UPSERTED = 'membership_upserted' unless defined?(MEMBERSHIP_UPSERTED)
|
|
5100
5102
|
MEMBERSHIP_DELETED = 'membership_deleted' unless defined?(MEMBERSHIP_DELETED)
|
|
@@ -5136,7 +5138,7 @@ module Io
|
|
|
5136
5138
|
end
|
|
5137
5139
|
|
|
5138
5140
|
def subtype_to_hash
|
|
5139
|
-
raise 'Cannot serialize an instance of event directly - must use one of the specific types: attribute_upserted, attribute_deleted, catalog_upserted, catalog_deleted, subcatalog_upserted, subcatalog_deleted, catalog_item_upserted, catalog_item_deleted, subcatalog_item_upserted, subcatalog_item_deleted, rate_deleted, rate_upserted, available_promotions_upserted, available_promotions_deleted, allocation_deleted, allocation_upserted, experience_deleted, experience_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, pricing_deleted, pricing_upserted, tier_upserted, tier_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, snapshot_upserted, snapshot_deleted, label_upserted, notification_upserted, notification_deleted, localized_item_upserted, localized_item_deleted, localized_item_snapshot, 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, return_upserted, return_deleted, targeting_item_upserted, targeting_item_deleted, tracking_label_event_upserted'
|
|
5141
|
+
raise 'Cannot serialize an instance of event directly - must use one of the specific types: attribute_upserted, attribute_deleted, catalog_upserted, catalog_deleted, subcatalog_upserted, subcatalog_deleted, catalog_item_upserted, catalog_item_deleted, subcatalog_item_upserted, subcatalog_item_deleted, rate_deleted, rate_upserted, available_promotions_upserted, available_promotions_deleted, allocation_deleted, allocation_upserted, experience_deleted, experience_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, pricing_deleted, pricing_upserted, tier_upserted, tier_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, snapshot_upserted, snapshot_deleted, label_upserted, notification_upserted, notification_deleted, localized_item_upserted, localized_item_upserted_v2, localized_item_deleted, localized_item_deleted_v2, localized_item_snapshot, 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, return_upserted, return_deleted, targeting_item_upserted, targeting_item_deleted, tracking_label_event_upserted'
|
|
5140
5142
|
end
|
|
5141
5143
|
|
|
5142
5144
|
def to_hash
|
|
@@ -5196,7 +5198,9 @@ module Io
|
|
|
5196
5198
|
when Types::NOTIFICATION_UPSERTED; NotificationUpserted.new(hash)
|
|
5197
5199
|
when Types::NOTIFICATION_DELETED; NotificationDeleted.new(hash)
|
|
5198
5200
|
when Types::LOCALIZED_ITEM_UPSERTED; LocalizedItemUpserted.new(hash)
|
|
5201
|
+
when Types::LOCALIZED_ITEM_UPSERTED_V2; LocalizedItemUpsertedV2.new(hash)
|
|
5199
5202
|
when Types::LOCALIZED_ITEM_DELETED; LocalizedItemDeleted.new(hash)
|
|
5203
|
+
when Types::LOCALIZED_ITEM_DELETED_V2; LocalizedItemDeletedV2.new(hash)
|
|
5200
5204
|
when Types::LOCALIZED_ITEM_SNAPSHOT; LocalizedItemSnapshot.new(hash)
|
|
5201
5205
|
when Types::MEMBERSHIP_UPSERTED; MembershipUpserted.new(hash)
|
|
5202
5206
|
when Types::MEMBERSHIP_DELETED; MembershipDeleted.new(hash)
|
|
@@ -5958,6 +5962,71 @@ module Io
|
|
|
5958
5962
|
|
|
5959
5963
|
end
|
|
5960
5964
|
|
|
5965
|
+
# Describes types of forms that can be used to assign an HS code based on
|
|
5966
|
+
# product data.
|
|
5967
|
+
class HintForm
|
|
5968
|
+
|
|
5969
|
+
module Types
|
|
5970
|
+
# A short phrase describing a product in generic terms, intended to uniquely
|
|
5971
|
+
# identify a code from a harmonization system. Hints of this type must provide
|
|
5972
|
+
# an exact match and will never return more than one result.
|
|
5973
|
+
PHRASE_HINT_FORM = 'phrase_hint_form' unless defined?(PHRASE_HINT_FORM)
|
|
5974
|
+
end
|
|
5975
|
+
|
|
5976
|
+
attr_reader :discriminator
|
|
5977
|
+
|
|
5978
|
+
def initialize(incoming={})
|
|
5979
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
|
5980
|
+
HttpClient::Preconditions.require_keys(opts, [:discriminator], 'HintForm')
|
|
5981
|
+
@discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator), String)
|
|
5982
|
+
end
|
|
5983
|
+
|
|
5984
|
+
def subtype_to_hash
|
|
5985
|
+
raise 'Cannot serialize an instance of hint_form directly - must use one of the specific types: phrase_hint_form'
|
|
5986
|
+
end
|
|
5987
|
+
|
|
5988
|
+
def to_hash
|
|
5989
|
+
subtype_to_hash.merge(:discriminator => @discriminator)
|
|
5990
|
+
end
|
|
5991
|
+
|
|
5992
|
+
def HintForm.from_json(hash)
|
|
5993
|
+
HttpClient::Preconditions.assert_class('hash', hash, Hash)
|
|
5994
|
+
discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
|
|
5995
|
+
if discriminator.empty?
|
|
5996
|
+
raise "Union type[hint_form] requires a field named 'discriminator'"
|
|
5997
|
+
end
|
|
5998
|
+
case discriminator
|
|
5999
|
+
when Types::PHRASE_HINT_FORM; PhraseHintForm.new(hash)
|
|
6000
|
+
else HintFormUndefinedType.new(:discriminator => discriminator)
|
|
6001
|
+
end
|
|
6002
|
+
end
|
|
6003
|
+
|
|
6004
|
+
end
|
|
6005
|
+
|
|
6006
|
+
class HintFormUndefinedType < HintForm
|
|
6007
|
+
|
|
6008
|
+
attr_reader :name
|
|
6009
|
+
|
|
6010
|
+
def initialize(incoming={})
|
|
6011
|
+
super(:discriminator => 'undefined_type')
|
|
6012
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
|
6013
|
+
@name = HttpClient::Preconditions.assert_class('name', opts.delete(:discriminator), String)
|
|
6014
|
+
end
|
|
6015
|
+
|
|
6016
|
+
def subtype_to_hash
|
|
6017
|
+
raise 'Unable to serialize undefined type to json'
|
|
6018
|
+
end
|
|
6019
|
+
|
|
6020
|
+
def copy(incoming={})
|
|
6021
|
+
raise 'Operation not supported for undefined type'
|
|
6022
|
+
end
|
|
6023
|
+
|
|
6024
|
+
def to_hash
|
|
6025
|
+
raise 'Operation not supported for undefined type'
|
|
6026
|
+
end
|
|
6027
|
+
|
|
6028
|
+
end
|
|
6029
|
+
|
|
5961
6030
|
# Types of rules used to apply on inventory to calculate available quantity
|
|
5962
6031
|
class InventoryStrategy
|
|
5963
6032
|
|
|
@@ -6346,7 +6415,6 @@ module Io
|
|
|
6346
6415
|
class Session
|
|
6347
6416
|
|
|
6348
6417
|
module Types
|
|
6349
|
-
SHOPIFY_SESSION = 'shopify_session' unless defined?(SHOPIFY_SESSION)
|
|
6350
6418
|
ORGANIZATION_SESSION = 'organization_session' unless defined?(ORGANIZATION_SESSION)
|
|
6351
6419
|
end
|
|
6352
6420
|
|
|
@@ -6359,7 +6427,7 @@ module Io
|
|
|
6359
6427
|
end
|
|
6360
6428
|
|
|
6361
6429
|
def subtype_to_hash
|
|
6362
|
-
raise 'Cannot serialize an instance of session directly - must use one of the specific types:
|
|
6430
|
+
raise 'Cannot serialize an instance of session directly - must use one of the specific types: organization_session'
|
|
6363
6431
|
end
|
|
6364
6432
|
|
|
6365
6433
|
def to_hash
|
|
@@ -6373,7 +6441,6 @@ module Io
|
|
|
6373
6441
|
raise "Union type[session] requires a field named 'discriminator'"
|
|
6374
6442
|
end
|
|
6375
6443
|
case discriminator
|
|
6376
|
-
when Types::SHOPIFY_SESSION; ShopifySession.new(hash)
|
|
6377
6444
|
when Types::ORGANIZATION_SESSION; OrganizationSession.new(hash)
|
|
6378
6445
|
else SessionUndefinedType.new(:discriminator => discriminator)
|
|
6379
6446
|
end
|
|
@@ -6902,7 +6969,13 @@ module Io
|
|
|
6902
6969
|
end
|
|
6903
6970
|
|
|
6904
6971
|
def AttributeIntent.ALL
|
|
6905
|
-
@@all ||= [AttributeIntent.fulfillment_method, AttributeIntent.price, AttributeIntent.taxability]
|
|
6972
|
+
@@all ||= [AttributeIntent.brand, AttributeIntent.fulfillment_method, AttributeIntent.price, AttributeIntent.taxability]
|
|
6973
|
+
end
|
|
6974
|
+
|
|
6975
|
+
# Attributes with this data type imply that this is the brand name of the item
|
|
6976
|
+
# for retailers that sell multiple brands
|
|
6977
|
+
def AttributeIntent.brand
|
|
6978
|
+
@@_brand ||= AttributeIntent.new('brand')
|
|
6906
6979
|
end
|
|
6907
6980
|
|
|
6908
6981
|
# Attributes with this data type imply whether delivery is a package or digital
|
|
@@ -7898,7 +7971,7 @@ module Io
|
|
|
7898
7971
|
end
|
|
7899
7972
|
|
|
7900
7973
|
def EventType.ALL
|
|
7901
|
-
@@all ||= [EventType.attribute_upserted, EventType.attribute_deleted, 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.available_promotions_upserted, EventType.available_promotions_deleted, EventType.allocation_deleted, EventType.allocation_upserted, EventType.experience_deleted, EventType.experience_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.pricing_deleted, EventType.pricing_upserted, EventType.tier_upserted, EventType.tier_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.snapshot_upserted, EventType.snapshot_deleted, EventType.label_upserted, EventType.notification_upserted, EventType.notification_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.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.return_upserted, EventType.return_deleted, EventType.targeting_item_upserted, EventType.targeting_item_deleted, EventType.tracking_label_event_upserted]
|
|
7974
|
+
@@all ||= [EventType.attribute_upserted, EventType.attribute_deleted, 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.available_promotions_upserted, EventType.available_promotions_deleted, EventType.allocation_deleted, EventType.allocation_upserted, EventType.experience_deleted, EventType.experience_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.pricing_deleted, EventType.pricing_upserted, EventType.tier_upserted, EventType.tier_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.snapshot_upserted, EventType.snapshot_deleted, EventType.label_upserted, EventType.notification_upserted, EventType.notification_deleted, EventType.localized_item_upserted, EventType.localized_item_upserted_v2, EventType.localized_item_deleted, EventType.localized_item_deleted_v2, EventType.localized_item_snapshot, 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.return_upserted, EventType.return_deleted, EventType.targeting_item_upserted, EventType.targeting_item_deleted, EventType.tracking_label_event_upserted]
|
|
7902
7975
|
end
|
|
7903
7976
|
|
|
7904
7977
|
def EventType.attribute_upserted
|
|
@@ -8085,10 +8158,18 @@ module Io
|
|
|
8085
8158
|
@@_localized_item_upserted ||= EventType.new('localized_item_upserted')
|
|
8086
8159
|
end
|
|
8087
8160
|
|
|
8161
|
+
def EventType.localized_item_upserted_v2
|
|
8162
|
+
@@_localized_item_upserted_v2 ||= EventType.new('localized_item_upserted_v2')
|
|
8163
|
+
end
|
|
8164
|
+
|
|
8088
8165
|
def EventType.localized_item_deleted
|
|
8089
8166
|
@@_localized_item_deleted ||= EventType.new('localized_item_deleted')
|
|
8090
8167
|
end
|
|
8091
8168
|
|
|
8169
|
+
def EventType.localized_item_deleted_v2
|
|
8170
|
+
@@_localized_item_deleted_v2 ||= EventType.new('localized_item_deleted_v2')
|
|
8171
|
+
end
|
|
8172
|
+
|
|
8092
8173
|
def EventType.localized_item_snapshot
|
|
8093
8174
|
@@_localized_item_snapshot ||= EventType.new('localized_item_snapshot')
|
|
8094
8175
|
end
|
|
@@ -8588,7 +8669,7 @@ module Io
|
|
|
8588
8669
|
end
|
|
8589
8670
|
|
|
8590
8671
|
def ImportType.ALL
|
|
8591
|
-
@@all ||= [ImportType.harmonization_codes]
|
|
8672
|
+
@@all ||= [ImportType.harmonization_codes, ImportType.catalog_items]
|
|
8592
8673
|
end
|
|
8593
8674
|
|
|
8594
8675
|
# Provides upload of HS-6 and HS-10 codes for the items in a catalog
|
|
@@ -8596,6 +8677,11 @@ module Io
|
|
|
8596
8677
|
@@_harmonization_codes ||= ImportType.new('harmonization_codes')
|
|
8597
8678
|
end
|
|
8598
8679
|
|
|
8680
|
+
# Provides bulk upsert of items into an organization's catalog.
|
|
8681
|
+
def ImportType.catalog_items
|
|
8682
|
+
@@_catalog_items ||= ImportType.new('catalog_items')
|
|
8683
|
+
end
|
|
8684
|
+
|
|
8599
8685
|
def to_hash
|
|
8600
8686
|
value
|
|
8601
8687
|
end
|
|
@@ -9075,7 +9161,7 @@ module Io
|
|
|
9075
9161
|
end
|
|
9076
9162
|
|
|
9077
9163
|
def OrderErrorCode.ALL
|
|
9078
|
-
@@all ||= [OrderErrorCode.generic_error, OrderErrorCode.order_item_not_available, OrderErrorCode.order_identifier_error]
|
|
9164
|
+
@@all ||= [OrderErrorCode.generic_error, OrderErrorCode.order_item_not_available, OrderErrorCode.order_identifier_error, OrderErrorCode.domestic_shipping_unavailable]
|
|
9079
9165
|
end
|
|
9080
9166
|
|
|
9081
9167
|
def OrderErrorCode.generic_error
|
|
@@ -9094,6 +9180,10 @@ module Io
|
|
|
9094
9180
|
@@_order_identifier_error ||= OrderErrorCode.new('order_identifier_error')
|
|
9095
9181
|
end
|
|
9096
9182
|
|
|
9183
|
+
def OrderErrorCode.domestic_shipping_unavailable
|
|
9184
|
+
@@_domestic_shipping_unavailable ||= OrderErrorCode.new('domestic_shipping_unavailable')
|
|
9185
|
+
end
|
|
9186
|
+
|
|
9097
9187
|
def to_hash
|
|
9098
9188
|
value
|
|
9099
9189
|
end
|
|
@@ -11270,13 +11360,19 @@ module Io
|
|
|
11270
11360
|
|
|
11271
11361
|
class AccountOrdersExportType < ExportType
|
|
11272
11362
|
|
|
11273
|
-
attr_reader :statement_id, :transaction_summary_id, :transaction_posted_from, :transaction_posted_to, :transaction_posted_on_or_after, :transaction_posted_after, :transaction_posted_on_or_before, :transaction_posted_before
|
|
11363
|
+
attr_reader :statement_id, :transaction_summary_id, :transaction_created_from, :transaction_created_to, :transaction_created_on_or_after, :transaction_created_after, :transaction_created_on_or_before, :transaction_created_before, :transaction_posted_from, :transaction_posted_to, :transaction_posted_on_or_after, :transaction_posted_after, :transaction_posted_on_or_before, :transaction_posted_before
|
|
11274
11364
|
|
|
11275
11365
|
def initialize(incoming={})
|
|
11276
11366
|
super(:discriminator => ExportType::Types::ACCOUNT_ORDERS_EXPORT_TYPE)
|
|
11277
11367
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
|
11278
11368
|
@statement_id = (x = opts.delete(:statement_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('statement_id', x, String))
|
|
11279
11369
|
@transaction_summary_id = (x = opts.delete(:transaction_summary_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('transaction_summary_id', x, String))
|
|
11370
|
+
@transaction_created_from = (x = opts.delete(:transaction_created_from); x.nil? ? nil : HttpClient::Preconditions.assert_class('transaction_created_from', HttpClient::Helper.to_date_iso8601(x), Date))
|
|
11371
|
+
@transaction_created_to = (x = opts.delete(:transaction_created_to); x.nil? ? nil : HttpClient::Preconditions.assert_class('transaction_created_to', HttpClient::Helper.to_date_iso8601(x), Date))
|
|
11372
|
+
@transaction_created_on_or_after = (x = opts.delete(:transaction_created_on_or_after); x.nil? ? nil : HttpClient::Preconditions.assert_class('transaction_created_on_or_after', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
|
|
11373
|
+
@transaction_created_after = (x = opts.delete(:transaction_created_after); x.nil? ? nil : HttpClient::Preconditions.assert_class('transaction_created_after', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
|
|
11374
|
+
@transaction_created_on_or_before = (x = opts.delete(:transaction_created_on_or_before); x.nil? ? nil : HttpClient::Preconditions.assert_class('transaction_created_on_or_before', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
|
|
11375
|
+
@transaction_created_before = (x = opts.delete(:transaction_created_before); x.nil? ? nil : HttpClient::Preconditions.assert_class('transaction_created_before', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
|
|
11280
11376
|
@transaction_posted_from = (x = opts.delete(:transaction_posted_from); x.nil? ? nil : HttpClient::Preconditions.assert_class('transaction_posted_from', HttpClient::Helper.to_date_iso8601(x), Date))
|
|
11281
11377
|
@transaction_posted_to = (x = opts.delete(:transaction_posted_to); x.nil? ? nil : HttpClient::Preconditions.assert_class('transaction_posted_to', HttpClient::Helper.to_date_iso8601(x), Date))
|
|
11282
11378
|
@transaction_posted_on_or_after = (x = opts.delete(:transaction_posted_on_or_after); x.nil? ? nil : HttpClient::Preconditions.assert_class('transaction_posted_on_or_after', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
|
|
@@ -11297,6 +11393,12 @@ module Io
|
|
|
11297
11393
|
{
|
|
11298
11394
|
:statement_id => statement_id,
|
|
11299
11395
|
:transaction_summary_id => transaction_summary_id,
|
|
11396
|
+
:transaction_created_from => transaction_created_from,
|
|
11397
|
+
:transaction_created_to => transaction_created_to,
|
|
11398
|
+
:transaction_created_on_or_after => transaction_created_on_or_after,
|
|
11399
|
+
:transaction_created_after => transaction_created_after,
|
|
11400
|
+
:transaction_created_on_or_before => transaction_created_on_or_before,
|
|
11401
|
+
:transaction_created_before => transaction_created_before,
|
|
11300
11402
|
:transaction_posted_from => transaction_posted_from,
|
|
11301
11403
|
:transaction_posted_to => transaction_posted_to,
|
|
11302
11404
|
:transaction_posted_on_or_after => transaction_posted_on_or_after,
|
|
@@ -11310,13 +11412,19 @@ module Io
|
|
|
11310
11412
|
|
|
11311
11413
|
class AccountTransactionsExportType < ExportType
|
|
11312
11414
|
|
|
11313
|
-
attr_reader :statement_id, :transaction_summary_id, :posted_from, :posted_to, :posted_on_or_after, :posted_after, :posted_on_or_before, :posted_before
|
|
11415
|
+
attr_reader :statement_id, :transaction_summary_id, :created_from, :created_to, :created_on_or_after, :created_after, :created_on_or_before, :created_before, :posted_from, :posted_to, :posted_on_or_after, :posted_after, :posted_on_or_before, :posted_before
|
|
11314
11416
|
|
|
11315
11417
|
def initialize(incoming={})
|
|
11316
11418
|
super(:discriminator => ExportType::Types::ACCOUNT_TRANSACTIONS_EXPORT_TYPE)
|
|
11317
11419
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
|
11318
11420
|
@statement_id = (x = opts.delete(:statement_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('statement_id', x, String))
|
|
11319
11421
|
@transaction_summary_id = (x = opts.delete(:transaction_summary_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('transaction_summary_id', x, String))
|
|
11422
|
+
@created_from = (x = opts.delete(:created_from); x.nil? ? nil : HttpClient::Preconditions.assert_class('created_from', HttpClient::Helper.to_date_iso8601(x), Date))
|
|
11423
|
+
@created_to = (x = opts.delete(:created_to); x.nil? ? nil : HttpClient::Preconditions.assert_class('created_to', HttpClient::Helper.to_date_iso8601(x), Date))
|
|
11424
|
+
@created_on_or_after = (x = opts.delete(:created_on_or_after); x.nil? ? nil : HttpClient::Preconditions.assert_class('created_on_or_after', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
|
|
11425
|
+
@created_after = (x = opts.delete(:created_after); x.nil? ? nil : HttpClient::Preconditions.assert_class('created_after', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
|
|
11426
|
+
@created_on_or_before = (x = opts.delete(:created_on_or_before); x.nil? ? nil : HttpClient::Preconditions.assert_class('created_on_or_before', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
|
|
11427
|
+
@created_before = (x = opts.delete(:created_before); x.nil? ? nil : HttpClient::Preconditions.assert_class('created_before', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
|
|
11320
11428
|
@posted_from = (x = opts.delete(:posted_from); x.nil? ? nil : HttpClient::Preconditions.assert_class('posted_from', HttpClient::Helper.to_date_iso8601(x), Date))
|
|
11321
11429
|
@posted_to = (x = opts.delete(:posted_to); x.nil? ? nil : HttpClient::Preconditions.assert_class('posted_to', HttpClient::Helper.to_date_iso8601(x), Date))
|
|
11322
11430
|
@posted_on_or_after = (x = opts.delete(:posted_on_or_after); x.nil? ? nil : HttpClient::Preconditions.assert_class('posted_on_or_after', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
|
|
@@ -11337,6 +11445,12 @@ module Io
|
|
|
11337
11445
|
{
|
|
11338
11446
|
:statement_id => statement_id,
|
|
11339
11447
|
:transaction_summary_id => transaction_summary_id,
|
|
11448
|
+
:created_from => created_from,
|
|
11449
|
+
:created_to => created_to,
|
|
11450
|
+
:created_on_or_after => created_on_or_after,
|
|
11451
|
+
:created_after => created_after,
|
|
11452
|
+
:created_on_or_before => created_on_or_before,
|
|
11453
|
+
:created_before => created_before,
|
|
11340
11454
|
:posted_from => posted_from,
|
|
11341
11455
|
:posted_to => posted_to,
|
|
11342
11456
|
:posted_on_or_after => posted_on_or_after,
|
|
@@ -15278,7 +15392,7 @@ module Io
|
|
|
15278
15392
|
# Some important fields related to experiences used in various APIs
|
|
15279
15393
|
class ExperienceSummary
|
|
15280
15394
|
|
|
15281
|
-
attr_reader :id, :key, :name
|
|
15395
|
+
attr_reader :id, :key, :name, :country, :currency, :language
|
|
15282
15396
|
|
|
15283
15397
|
def initialize(incoming={})
|
|
15284
15398
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
|
@@ -15286,6 +15400,9 @@ module Io
|
|
|
15286
15400
|
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
|
15287
15401
|
@key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
|
|
15288
15402
|
@name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
|
|
15403
|
+
@country = (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, String))
|
|
15404
|
+
@currency = (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String))
|
|
15405
|
+
@language = (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String))
|
|
15289
15406
|
end
|
|
15290
15407
|
|
|
15291
15408
|
def to_json
|
|
@@ -15300,7 +15417,10 @@ module Io
|
|
|
15300
15417
|
{
|
|
15301
15418
|
:id => id,
|
|
15302
15419
|
:key => key,
|
|
15303
|
-
:name => name
|
|
15420
|
+
:name => name,
|
|
15421
|
+
:country => country,
|
|
15422
|
+
:currency => currency,
|
|
15423
|
+
:language => language
|
|
15304
15424
|
}
|
|
15305
15425
|
end
|
|
15306
15426
|
|
|
@@ -16560,6 +16680,35 @@ module Io
|
|
|
16560
16680
|
|
|
16561
16681
|
end
|
|
16562
16682
|
|
|
16683
|
+
# Result of looking up a code using a hint.
|
|
16684
|
+
class HintResult
|
|
16685
|
+
|
|
16686
|
+
attr_reader :hs10_code, :likelihood
|
|
16687
|
+
|
|
16688
|
+
def initialize(incoming={})
|
|
16689
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
|
16690
|
+
HttpClient::Preconditions.require_keys(opts, [:hs10_code, :likelihood], 'HintResult')
|
|
16691
|
+
@hs10_code = (x = opts.delete(:hs10_code); x.is_a?(::Io::Flow::V0::Models::Hs10Code) ? x : ::Io::Flow::V0::Models::Hs10Code.new(x))
|
|
16692
|
+
@likelihood = HttpClient::Preconditions.assert_class('likelihood', HttpClient::Helper.to_big_decimal(opts.delete(:likelihood)), BigDecimal)
|
|
16693
|
+
end
|
|
16694
|
+
|
|
16695
|
+
def to_json
|
|
16696
|
+
JSON.dump(to_hash)
|
|
16697
|
+
end
|
|
16698
|
+
|
|
16699
|
+
def copy(incoming={})
|
|
16700
|
+
HintResult.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
|
16701
|
+
end
|
|
16702
|
+
|
|
16703
|
+
def to_hash
|
|
16704
|
+
{
|
|
16705
|
+
:hs10_code => hs10_code.to_hash,
|
|
16706
|
+
:likelihood => likelihood
|
|
16707
|
+
}
|
|
16708
|
+
end
|
|
16709
|
+
|
|
16710
|
+
end
|
|
16711
|
+
|
|
16563
16712
|
# The (Harmonized System) HS-10 code assigned to an item with a given
|
|
16564
16713
|
# origin/destination pair.
|
|
16565
16714
|
class Hs10
|
|
@@ -16596,6 +16745,40 @@ module Io
|
|
|
16596
16745
|
|
|
16597
16746
|
end
|
|
16598
16747
|
|
|
16748
|
+
# Harmonized System codes for specific countries, up to 10 digits (HS-10). Not
|
|
16749
|
+
# all countries use all 10 digits of precision.
|
|
16750
|
+
class Hs10Code
|
|
16751
|
+
|
|
16752
|
+
attr_reader :code, :destination, :parent, :description
|
|
16753
|
+
|
|
16754
|
+
def initialize(incoming={})
|
|
16755
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
|
16756
|
+
HttpClient::Preconditions.require_keys(opts, [:code, :destination], 'Hs10Code')
|
|
16757
|
+
@code = HttpClient::Preconditions.assert_class('code', opts.delete(:code), String)
|
|
16758
|
+
@destination = HttpClient::Preconditions.assert_class('destination', opts.delete(:destination), String)
|
|
16759
|
+
@parent = (x = opts.delete(:parent); x.nil? ? nil : HttpClient::Preconditions.assert_class('parent', x, String))
|
|
16760
|
+
@description = (x = opts.delete(:description); x.nil? ? nil : HttpClient::Preconditions.assert_class('description', x, String))
|
|
16761
|
+
end
|
|
16762
|
+
|
|
16763
|
+
def to_json
|
|
16764
|
+
JSON.dump(to_hash)
|
|
16765
|
+
end
|
|
16766
|
+
|
|
16767
|
+
def copy(incoming={})
|
|
16768
|
+
Hs10Code.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
|
16769
|
+
end
|
|
16770
|
+
|
|
16771
|
+
def to_hash
|
|
16772
|
+
{
|
|
16773
|
+
:code => code,
|
|
16774
|
+
:destination => destination,
|
|
16775
|
+
:parent => parent,
|
|
16776
|
+
:description => description
|
|
16777
|
+
}
|
|
16778
|
+
end
|
|
16779
|
+
|
|
16780
|
+
end
|
|
16781
|
+
|
|
16599
16782
|
# Event raised whenever an HS-10 code is unassigned from an item
|
|
16600
16783
|
class Hs10CodeDeleted < Event
|
|
16601
16784
|
|
|
@@ -16839,7 +17022,8 @@ module Io
|
|
|
16839
17022
|
|
|
16840
17023
|
end
|
|
16841
17024
|
|
|
16842
|
-
# Harmonized System codes.
|
|
17025
|
+
# Harmonized System codes, up to 6 digits (HS-6). These codes should be the same
|
|
17026
|
+
# for all countries.
|
|
16843
17027
|
class HsCode
|
|
16844
17028
|
|
|
16845
17029
|
attr_reader :code, :parent, :description
|
|
@@ -19001,6 +19185,39 @@ module Io
|
|
|
19001
19185
|
|
|
19002
19186
|
end
|
|
19003
19187
|
|
|
19188
|
+
class LocalizedItemDeletedV2 < Event
|
|
19189
|
+
|
|
19190
|
+
attr_reader :event_id, :timestamp, :organization, :id
|
|
19191
|
+
|
|
19192
|
+
def initialize(incoming={})
|
|
19193
|
+
super(:discriminator => Event::Types::LOCALIZED_ITEM_DELETED_V2)
|
|
19194
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
|
19195
|
+
HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :id], 'LocalizedItemDeletedV2')
|
|
19196
|
+
@event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
|
|
19197
|
+
@timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
|
|
19198
|
+
@organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
|
|
19199
|
+
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
|
19200
|
+
end
|
|
19201
|
+
|
|
19202
|
+
def to_json
|
|
19203
|
+
JSON.dump(to_hash)
|
|
19204
|
+
end
|
|
19205
|
+
|
|
19206
|
+
def copy(incoming={})
|
|
19207
|
+
LocalizedItemDeletedV2.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
|
19208
|
+
end
|
|
19209
|
+
|
|
19210
|
+
def subtype_to_hash
|
|
19211
|
+
{
|
|
19212
|
+
:event_id => event_id,
|
|
19213
|
+
:timestamp => timestamp,
|
|
19214
|
+
:organization => organization,
|
|
19215
|
+
:id => id
|
|
19216
|
+
}
|
|
19217
|
+
end
|
|
19218
|
+
|
|
19219
|
+
end
|
|
19220
|
+
|
|
19004
19221
|
class LocalizedItemDuty < LocalizedPrice
|
|
19005
19222
|
|
|
19006
19223
|
attr_reader :currency, :amount, :label, :base, :adjustment
|
|
@@ -19161,6 +19378,43 @@ module Io
|
|
|
19161
19378
|
|
|
19162
19379
|
end
|
|
19163
19380
|
|
|
19381
|
+
class LocalizedItemUpsertedV2 < Event
|
|
19382
|
+
|
|
19383
|
+
attr_reader :event_id, :timestamp, :organization, :id, :item, :catalog
|
|
19384
|
+
|
|
19385
|
+
def initialize(incoming={})
|
|
19386
|
+
super(:discriminator => Event::Types::LOCALIZED_ITEM_UPSERTED_V2)
|
|
19387
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
|
19388
|
+
HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :id, :item, :catalog], 'LocalizedItemUpsertedV2')
|
|
19389
|
+
@event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
|
|
19390
|
+
@timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
|
|
19391
|
+
@organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
|
|
19392
|
+
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
|
19393
|
+
@item = (x = opts.delete(:item); x.is_a?(::Io::Flow::V0::Models::Item) ? x : ::Io::Flow::V0::Models::Item.new(x))
|
|
19394
|
+
@catalog = HttpClient::Preconditions.assert_class('catalog', opts.delete(:catalog), String)
|
|
19395
|
+
end
|
|
19396
|
+
|
|
19397
|
+
def to_json
|
|
19398
|
+
JSON.dump(to_hash)
|
|
19399
|
+
end
|
|
19400
|
+
|
|
19401
|
+
def copy(incoming={})
|
|
19402
|
+
LocalizedItemUpsertedV2.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
|
19403
|
+
end
|
|
19404
|
+
|
|
19405
|
+
def subtype_to_hash
|
|
19406
|
+
{
|
|
19407
|
+
:event_id => event_id,
|
|
19408
|
+
:timestamp => timestamp,
|
|
19409
|
+
:organization => organization,
|
|
19410
|
+
:id => id,
|
|
19411
|
+
:item => item.to_hash,
|
|
19412
|
+
:catalog => catalog
|
|
19413
|
+
}
|
|
19414
|
+
end
|
|
19415
|
+
|
|
19416
|
+
end
|
|
19417
|
+
|
|
19164
19418
|
class LocalizedItemVat < LocalizedPrice
|
|
19165
19419
|
|
|
19166
19420
|
attr_reader :currency, :amount, :label, :base, :name, :adjustment
|
|
@@ -20205,7 +20459,7 @@ module Io
|
|
|
20205
20459
|
|
|
20206
20460
|
class OrderError
|
|
20207
20461
|
|
|
20208
|
-
attr_reader :code, :messages, :numbers
|
|
20462
|
+
attr_reader :code, :messages, :numbers, :destination_country
|
|
20209
20463
|
|
|
20210
20464
|
def initialize(incoming={})
|
|
20211
20465
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
|
@@ -20213,6 +20467,7 @@ module Io
|
|
|
20213
20467
|
@code = (x = opts.delete(:code); x.is_a?(::Io::Flow::V0::Models::OrderErrorCode) ? x : ::Io::Flow::V0::Models::OrderErrorCode.apply(x))
|
|
20214
20468
|
@messages = HttpClient::Preconditions.assert_class('messages', opts.delete(:messages), Array).map { |v| HttpClient::Preconditions.assert_class('messages', v, String) }
|
|
20215
20469
|
@numbers = (x = opts.delete(:numbers); x.nil? ? nil : HttpClient::Preconditions.assert_class('numbers', x, Array).map { |v| HttpClient::Preconditions.assert_class('numbers', v, String) })
|
|
20470
|
+
@destination_country = (x = opts.delete(:destination_country); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Country) ? x : ::Io::Flow::V0::Models::Country.new(x)))
|
|
20216
20471
|
end
|
|
20217
20472
|
|
|
20218
20473
|
def to_json
|
|
@@ -20227,7 +20482,8 @@ module Io
|
|
|
20227
20482
|
{
|
|
20228
20483
|
:code => code.value,
|
|
20229
20484
|
:messages => messages,
|
|
20230
|
-
:numbers => numbers.nil? ? nil : numbers
|
|
20485
|
+
:numbers => numbers.nil? ? nil : numbers,
|
|
20486
|
+
:destination_country => destination_country.nil? ? nil : destination_country.to_hash
|
|
20231
20487
|
}
|
|
20232
20488
|
end
|
|
20233
20489
|
|
|
@@ -20755,7 +21011,7 @@ module Io
|
|
|
20755
21011
|
|
|
20756
21012
|
class OrderUpserted < Event
|
|
20757
21013
|
|
|
20758
|
-
attr_reader :event_id, :timestamp, :organization, :number, :environment, :experience_id, :expires_at, :customer, :selections, :items, :destination, :deliveries, :prices, :discount, :delivered_duty, :total, :created_at, :updated_at, :submitted_at, :lines, :attributes
|
|
21014
|
+
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
|
|
20759
21015
|
|
|
20760
21016
|
def initialize(incoming={})
|
|
20761
21017
|
super(:discriminator => Event::Types::ORDER_UPSERTED)
|
|
@@ -20774,6 +21030,7 @@ module Io
|
|
|
20774
21030
|
@destination = HttpClient::Preconditions.assert_class('destination', HttpClient::Helper.to_object(opts.delete(:destination)), Hash)
|
|
20775
21031
|
@deliveries = HttpClient::Preconditions.assert_class('deliveries', opts.delete(:deliveries), Array).map { |v| HttpClient::Preconditions.assert_class('deliveries', HttpClient::Helper.to_object(v), Hash) }
|
|
20776
21032
|
@prices = HttpClient::Preconditions.assert_class('prices', opts.delete(:prices), Array).map { |v| HttpClient::Preconditions.assert_class('prices', HttpClient::Helper.to_object(v), Hash) }
|
|
21033
|
+
@payments = (x = opts.delete(:payments); x.nil? ? nil : HttpClient::Preconditions.assert_class('payments', x, Array).map { |v| HttpClient::Preconditions.assert_class('payments', HttpClient::Helper.to_object(v), Hash) })
|
|
20777
21034
|
@discount = (x = opts.delete(:discount); x.nil? ? nil : HttpClient::Preconditions.assert_class('discount', HttpClient::Helper.to_object(x), Hash))
|
|
20778
21035
|
@delivered_duty = (x = opts.delete(:delivered_duty); x.nil? ? nil : HttpClient::Preconditions.assert_class('delivered_duty', x, String))
|
|
20779
21036
|
@total = HttpClient::Preconditions.assert_class('total', HttpClient::Helper.to_object(opts.delete(:total)), Hash)
|
|
@@ -20807,6 +21064,7 @@ module Io
|
|
|
20807
21064
|
:destination => destination,
|
|
20808
21065
|
:deliveries => deliveries,
|
|
20809
21066
|
:prices => prices,
|
|
21067
|
+
:payments => payments.nil? ? nil : payments,
|
|
20810
21068
|
:discount => discount,
|
|
20811
21069
|
:delivered_duty => delivered_duty,
|
|
20812
21070
|
:total => total,
|
|
@@ -21160,16 +21418,22 @@ module Io
|
|
|
21160
21418
|
|
|
21161
21419
|
end
|
|
21162
21420
|
|
|
21421
|
+
# Represents a session created for an organization. Primary method to select an
|
|
21422
|
+
# experience for a given user session and ensure that experience does not change
|
|
21423
|
+
# throughout the user's activity. Provides authentication to objects created
|
|
21424
|
+
# during this session (e.g. order).
|
|
21163
21425
|
class OrganizationSession < Session
|
|
21164
21426
|
|
|
21165
|
-
attr_reader :id, :organization, :environment, :attributes, :ip, :local
|
|
21427
|
+
attr_reader :id, :organization, :visitor, :visit, :environment, :attributes, :ip, :local
|
|
21166
21428
|
|
|
21167
21429
|
def initialize(incoming={})
|
|
21168
21430
|
super(:discriminator => Session::Types::ORGANIZATION_SESSION)
|
|
21169
21431
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
|
21170
|
-
HttpClient::Preconditions.require_keys(opts, [:id, :organization, :environment, :attributes], 'OrganizationSession')
|
|
21432
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :organization, :visitor, :visit, :environment, :attributes], 'OrganizationSession')
|
|
21171
21433
|
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
|
21172
21434
|
@organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
|
|
21435
|
+
@visitor = (x = opts.delete(:visitor); x.is_a?(::Io::Flow::V0::Models::SessionVisitor) ? x : ::Io::Flow::V0::Models::SessionVisitor.new(x))
|
|
21436
|
+
@visit = (x = opts.delete(:visit); x.is_a?(::Io::Flow::V0::Models::SessionVisit) ? x : ::Io::Flow::V0::Models::SessionVisit.new(x))
|
|
21173
21437
|
@environment = (x = opts.delete(:environment); x.is_a?(::Io::Flow::V0::Models::Environment) ? x : ::Io::Flow::V0::Models::Environment.apply(x))
|
|
21174
21438
|
@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 }
|
|
21175
21439
|
@ip = (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String))
|
|
@@ -21188,6 +21452,8 @@ module Io
|
|
|
21188
21452
|
{
|
|
21189
21453
|
:id => id,
|
|
21190
21454
|
:organization => organization,
|
|
21455
|
+
:visitor => visitor.to_hash,
|
|
21456
|
+
:visit => visit.to_hash,
|
|
21191
21457
|
:environment => environment.value,
|
|
21192
21458
|
:attributes => attributes,
|
|
21193
21459
|
:ip => ip,
|
|
@@ -22133,6 +22399,63 @@ module Io
|
|
|
22133
22399
|
|
|
22134
22400
|
end
|
|
22135
22401
|
|
|
22402
|
+
class PhraseHint
|
|
22403
|
+
|
|
22404
|
+
attr_reader :phrase, :hs10_code
|
|
22405
|
+
|
|
22406
|
+
def initialize(incoming={})
|
|
22407
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
|
22408
|
+
HttpClient::Preconditions.require_keys(opts, [:phrase, :hs10_code], 'PhraseHint')
|
|
22409
|
+
@phrase = HttpClient::Preconditions.assert_class('phrase', opts.delete(:phrase), String)
|
|
22410
|
+
@hs10_code = (x = opts.delete(:hs10_code); x.is_a?(::Io::Flow::V0::Models::Hs10Code) ? x : ::Io::Flow::V0::Models::Hs10Code.new(x))
|
|
22411
|
+
end
|
|
22412
|
+
|
|
22413
|
+
def to_json
|
|
22414
|
+
JSON.dump(to_hash)
|
|
22415
|
+
end
|
|
22416
|
+
|
|
22417
|
+
def copy(incoming={})
|
|
22418
|
+
PhraseHint.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
|
22419
|
+
end
|
|
22420
|
+
|
|
22421
|
+
def to_hash
|
|
22422
|
+
{
|
|
22423
|
+
:phrase => phrase,
|
|
22424
|
+
:hs10_code => hs10_code.to_hash
|
|
22425
|
+
}
|
|
22426
|
+
end
|
|
22427
|
+
|
|
22428
|
+
end
|
|
22429
|
+
|
|
22430
|
+
class PhraseHintForm < HintForm
|
|
22431
|
+
|
|
22432
|
+
attr_reader :phrase, :destination
|
|
22433
|
+
|
|
22434
|
+
def initialize(incoming={})
|
|
22435
|
+
super(:discriminator => HintForm::Types::PHRASE_HINT_FORM)
|
|
22436
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
|
22437
|
+
HttpClient::Preconditions.require_keys(opts, [:phrase, :destination], 'PhraseHintForm')
|
|
22438
|
+
@phrase = HttpClient::Preconditions.assert_class('phrase', opts.delete(:phrase), String)
|
|
22439
|
+
@destination = HttpClient::Preconditions.assert_class('destination', opts.delete(:destination), String)
|
|
22440
|
+
end
|
|
22441
|
+
|
|
22442
|
+
def to_json
|
|
22443
|
+
JSON.dump(to_hash)
|
|
22444
|
+
end
|
|
22445
|
+
|
|
22446
|
+
def copy(incoming={})
|
|
22447
|
+
PhraseHintForm.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
|
22448
|
+
end
|
|
22449
|
+
|
|
22450
|
+
def subtype_to_hash
|
|
22451
|
+
{
|
|
22452
|
+
:phrase => phrase,
|
|
22453
|
+
:destination => destination
|
|
22454
|
+
}
|
|
22455
|
+
end
|
|
22456
|
+
|
|
22457
|
+
end
|
|
22458
|
+
|
|
22136
22459
|
# Represents a collection of items, the available delivery option tier for that
|
|
22137
22460
|
# collection of items, and metadata about those options
|
|
22138
22461
|
class PhysicalDelivery < Delivery
|
|
@@ -24093,6 +24416,35 @@ module Io
|
|
|
24093
24416
|
|
|
24094
24417
|
end
|
|
24095
24418
|
|
|
24419
|
+
# Configures session expiration time. We default to 30 minutes to follow Google
|
|
24420
|
+
# Analytics
|
|
24421
|
+
class SessionExpirationConfig
|
|
24422
|
+
|
|
24423
|
+
attr_reader :unit, :value
|
|
24424
|
+
|
|
24425
|
+
def initialize(incoming={})
|
|
24426
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
|
24427
|
+
@unit = (x = (x = opts.delete(:unit); x.nil? ? "minute" : x); x.is_a?(::Io::Flow::V0::Models::UnitOfTime) ? x : ::Io::Flow::V0::Models::UnitOfTime.apply(x))
|
|
24428
|
+
@value = HttpClient::Preconditions.assert_class('value', (x = opts.delete(:value); x.nil? ? 30 : x), Integer)
|
|
24429
|
+
end
|
|
24430
|
+
|
|
24431
|
+
def to_json
|
|
24432
|
+
JSON.dump(to_hash)
|
|
24433
|
+
end
|
|
24434
|
+
|
|
24435
|
+
def copy(incoming={})
|
|
24436
|
+
SessionExpirationConfig.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
|
24437
|
+
end
|
|
24438
|
+
|
|
24439
|
+
def to_hash
|
|
24440
|
+
{
|
|
24441
|
+
:unit => unit.value,
|
|
24442
|
+
:value => value
|
|
24443
|
+
}
|
|
24444
|
+
end
|
|
24445
|
+
|
|
24446
|
+
end
|
|
24447
|
+
|
|
24096
24448
|
class SessionForm
|
|
24097
24449
|
|
|
24098
24450
|
attr_reader :ip, :experience, :country, :currency, :language, :locale, :attributes
|
|
@@ -24202,6 +24554,64 @@ module Io
|
|
|
24202
24554
|
|
|
24203
24555
|
end
|
|
24204
24556
|
|
|
24557
|
+
# A session visit expires after a configurable period of inactivity (e.g. 30
|
|
24558
|
+
# minutes).
|
|
24559
|
+
class SessionVisit
|
|
24560
|
+
|
|
24561
|
+
attr_reader :id, :expires_at
|
|
24562
|
+
|
|
24563
|
+
def initialize(incoming={})
|
|
24564
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
|
24565
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :expires_at], 'SessionVisit')
|
|
24566
|
+
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
|
24567
|
+
@expires_at = HttpClient::Preconditions.assert_class('expires_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:expires_at)), DateTime)
|
|
24568
|
+
end
|
|
24569
|
+
|
|
24570
|
+
def to_json
|
|
24571
|
+
JSON.dump(to_hash)
|
|
24572
|
+
end
|
|
24573
|
+
|
|
24574
|
+
def copy(incoming={})
|
|
24575
|
+
SessionVisit.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
|
24576
|
+
end
|
|
24577
|
+
|
|
24578
|
+
def to_hash
|
|
24579
|
+
{
|
|
24580
|
+
:id => id,
|
|
24581
|
+
:expires_at => expires_at
|
|
24582
|
+
}
|
|
24583
|
+
end
|
|
24584
|
+
|
|
24585
|
+
end
|
|
24586
|
+
|
|
24587
|
+
# A session visitor is a unique identifier for our best guess as to who the
|
|
24588
|
+
# individual user is interacting with Flow.
|
|
24589
|
+
class SessionVisitor
|
|
24590
|
+
|
|
24591
|
+
attr_reader :id
|
|
24592
|
+
|
|
24593
|
+
def initialize(incoming={})
|
|
24594
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
|
24595
|
+
HttpClient::Preconditions.require_keys(opts, [:id], 'SessionVisitor')
|
|
24596
|
+
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
|
24597
|
+
end
|
|
24598
|
+
|
|
24599
|
+
def to_json
|
|
24600
|
+
JSON.dump(to_hash)
|
|
24601
|
+
end
|
|
24602
|
+
|
|
24603
|
+
def copy(incoming={})
|
|
24604
|
+
SessionVisitor.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
|
24605
|
+
end
|
|
24606
|
+
|
|
24607
|
+
def to_hash
|
|
24608
|
+
{
|
|
24609
|
+
:id => id
|
|
24610
|
+
}
|
|
24611
|
+
end
|
|
24612
|
+
|
|
24613
|
+
end
|
|
24614
|
+
|
|
24205
24615
|
class ShippingAddress
|
|
24206
24616
|
|
|
24207
24617
|
attr_reader :contact, :location
|
|
@@ -24547,49 +24957,6 @@ module Io
|
|
|
24547
24957
|
|
|
24548
24958
|
end
|
|
24549
24959
|
|
|
24550
|
-
class ShopifySession < Session
|
|
24551
|
-
|
|
24552
|
-
attr_reader :id, :organization, :environment, :attributes, :ip, :local, :shop, :cart, :experiments
|
|
24553
|
-
|
|
24554
|
-
def initialize(incoming={})
|
|
24555
|
-
super(:discriminator => Session::Types::SHOPIFY_SESSION)
|
|
24556
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
|
24557
|
-
HttpClient::Preconditions.require_keys(opts, [:id, :organization, :environment, :attributes, :shop, :cart], 'ShopifySession')
|
|
24558
|
-
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
|
24559
|
-
@organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
|
|
24560
|
-
@environment = (x = opts.delete(:environment); x.is_a?(::Io::Flow::V0::Models::Environment) ? x : ::Io::Flow::V0::Models::Environment.apply(x))
|
|
24561
|
-
@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 }
|
|
24562
|
-
@ip = (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String))
|
|
24563
|
-
@local = (x = opts.delete(:local); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::LocalSession) ? x : ::Io::Flow::V0::Models::LocalSession.new(x)))
|
|
24564
|
-
@shop = HttpClient::Preconditions.assert_class('shop', opts.delete(:shop), String)
|
|
24565
|
-
@cart = (x = opts.delete(:cart); x.is_a?(::Io::Flow::V0::Models::CartReference) ? x : ::Io::Flow::V0::Models::CartReference.new(x))
|
|
24566
|
-
@experiments = HttpClient::Preconditions.assert_class('experiments', (x = opts.delete(:experiments); x.nil? ? {} : x), Hash).inject({}) { |h, d| h[d[0]] = (x = d[1]; x.is_a?(::Io::Flow::V0::Models::ExperimentStatus) ? x : ::Io::Flow::V0::Models::ExperimentStatus.new(x)); h }
|
|
24567
|
-
end
|
|
24568
|
-
|
|
24569
|
-
def to_json
|
|
24570
|
-
JSON.dump(to_hash)
|
|
24571
|
-
end
|
|
24572
|
-
|
|
24573
|
-
def copy(incoming={})
|
|
24574
|
-
ShopifySession.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
|
24575
|
-
end
|
|
24576
|
-
|
|
24577
|
-
def subtype_to_hash
|
|
24578
|
-
{
|
|
24579
|
-
:id => id,
|
|
24580
|
-
:organization => organization,
|
|
24581
|
-
:environment => environment.value,
|
|
24582
|
-
:attributes => attributes,
|
|
24583
|
-
:ip => ip,
|
|
24584
|
-
:local => local.nil? ? nil : local.to_hash,
|
|
24585
|
-
:shop => shop,
|
|
24586
|
-
:cart => cart.to_hash,
|
|
24587
|
-
:experiments => experiments.inject({}) { |hash, o| hash[o[0]] = o[1].nil? ? nil : o[1].to_hash; hash }
|
|
24588
|
-
}
|
|
24589
|
-
end
|
|
24590
|
-
|
|
24591
|
-
end
|
|
24592
|
-
|
|
24593
24960
|
class SnapshotDeleted < Event
|
|
24594
24961
|
|
|
24595
24962
|
attr_reader :event_id, :timestamp, :snapshot_id
|
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.22
|
|
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: 2017-
|
|
11
|
+
date: 2017-07-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: json
|
|
@@ -38,7 +38,7 @@ dependencies:
|
|
|
38
38
|
- - ">="
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
40
|
version: '0'
|
|
41
|
-
description: Native ruby client for the Flow REST API. Detailed information at
|
|
41
|
+
description: Native ruby client for the Flow REST API. Detailed information at https://app.apibuilder.io/flow/api
|
|
42
42
|
email: tech@flow.io
|
|
43
43
|
executables: []
|
|
44
44
|
extensions: []
|