flowcommerce 0.2.83 → 0.2.91
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -7
- data/lib/flow_commerce/flow_api_v0_client.rb +1085 -161
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 067d77ab7176a02bd12f913b31c0a30be7854b1b29c4b918ba25e9794512b983
|
4
|
+
data.tar.gz: 31da501dc8d3c0be8e32998ff9177b683246703da35b3649b0974435714dc536
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 929244d3c0fe76f2f7e206726c3af90e0435cc18967a3784a853643a667b73aaad4b472ec49781e7e2ee5f847f77756527979af526fbe57438304b662a8f88ff
|
7
|
+
data.tar.gz: ce8a010837c4d6d99f1c9d463936f5dabf1185f28277939252b397f3a81b8709215238002bbfeeeff90fdab84d85f50e9f3dedbecf3875517d7ea717c93effa6
|
data/README.md
CHANGED
@@ -2,13 +2,6 @@
|
|
2
2
|
|
3
3
|
Native ruby client to the Flow API (https://api.flow.io)
|
4
4
|
|
5
|
-
## Status
|
6
|
-
|
7
|
-
Please note that this library and APIs are in ALPHA and are subject to
|
8
|
-
change and will break in the future. Once Flow Commerce releases its
|
9
|
-
official 1.0 library, API changes will be backwards compatible. Until
|
10
|
-
then - we are super grateful for your patience as we finalize the API
|
11
|
-
for our launch.
|
12
5
|
|
13
6
|
## Installation
|
14
7
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# Generated by API Builder - https://www.apibuilder.io
|
2
|
-
# Service version: 0.9.
|
3
|
-
# apibuilder 0.15.
|
2
|
+
# Service version: 0.9.79
|
3
|
+
# apibuilder 0.15.11 app.apibuilder.io/flow/api/latest/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 = 'apibuilder 0.15.
|
29
|
-
VERSION = '0.9.
|
28
|
+
USER_AGENT = 'apibuilder 0.15.11 app.apibuilder.io/flow/api/latest/ruby_client' unless defined?(Constants::USER_AGENT)
|
29
|
+
VERSION = '0.9.79' unless defined?(Constants::VERSION)
|
30
30
|
VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
|
31
31
|
|
32
32
|
end
|
@@ -662,7 +662,8 @@ module Io
|
|
662
662
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
663
663
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
664
664
|
query = {
|
665
|
-
:country => (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, Array).map { |v| HttpClient::Preconditions.assert_class('country', v, String) })
|
665
|
+
:country => (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, Array).map { |v| HttpClient::Preconditions.assert_class('country', v, String) }),
|
666
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
666
667
|
}.delete_if { |k, v| v.nil? }
|
667
668
|
r = @client.request("/#{CGI.escape(organization)}/address/configurations").with_query(query).get
|
668
669
|
r.map { |x| ::Io::Flow::V0::Models::AddressConfiguration.new(x) }
|
@@ -848,10 +849,14 @@ module Io
|
|
848
849
|
r.map { |x| ::Io::Flow::V0::Models::CheckoutAttribute.new(x) }
|
849
850
|
end
|
850
851
|
|
851
|
-
def post(organization, checkout_attribute_form)
|
852
|
+
def post(organization, checkout_attribute_form, incoming={})
|
852
853
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
854
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
855
|
+
query = {
|
856
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
857
|
+
}.delete_if { |k, v| v.nil? }
|
853
858
|
(x = checkout_attribute_form; x.is_a?(::Io::Flow::V0::Models::CheckoutAttributeForm) ? x : ::Io::Flow::V0::Models::CheckoutAttributeForm.new(x))
|
854
|
-
r = @client.request("/#{CGI.escape(organization)}/checkout/attributes").with_json(checkout_attribute_form.to_json).post
|
859
|
+
r = @client.request("/#{CGI.escape(organization)}/checkout/attributes").with_query(query).with_json(checkout_attribute_form.to_json).post
|
855
860
|
::Io::Flow::V0::Models::CheckoutAttribute.new(r)
|
856
861
|
end
|
857
862
|
|
@@ -862,11 +867,15 @@ module Io
|
|
862
867
|
::Io::Flow::V0::Models::CheckoutAttribute.new(r)
|
863
868
|
end
|
864
869
|
|
865
|
-
def put_by_id(organization, id, checkout_attribute_form)
|
870
|
+
def put_by_id(organization, id, checkout_attribute_form, incoming={})
|
866
871
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
867
872
|
HttpClient::Preconditions.assert_class('id', id, String)
|
873
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
874
|
+
query = {
|
875
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
876
|
+
}.delete_if { |k, v| v.nil? }
|
868
877
|
(x = checkout_attribute_form; x.is_a?(::Io::Flow::V0::Models::CheckoutAttributeForm) ? x : ::Io::Flow::V0::Models::CheckoutAttributeForm.new(x))
|
869
|
-
r = @client.request("/#{CGI.escape(organization)}/checkout/attributes/#{CGI.escape(id)}").with_json(checkout_attribute_form.to_json).put
|
878
|
+
r = @client.request("/#{CGI.escape(organization)}/checkout/attributes/#{CGI.escape(id)}").with_query(query).with_json(checkout_attribute_form.to_json).put
|
870
879
|
::Io::Flow::V0::Models::CheckoutAttribute.new(r)
|
871
880
|
end
|
872
881
|
|
@@ -895,7 +904,8 @@ module Io
|
|
895
904
|
query = {
|
896
905
|
:number => (x = opts.delete(:number); x.nil? ? nil : HttpClient::Preconditions.assert_class('number', x, Array).map { |v| HttpClient::Preconditions.assert_class('number', v, String) }),
|
897
906
|
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
898
|
-
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer)
|
907
|
+
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
908
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
899
909
|
}.delete_if { |k, v| v.nil? }
|
900
910
|
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/item/content/checkout").with_query(query).get
|
901
911
|
r.map { |x| ::Io::Flow::V0::Models::CheckoutItemContent.new(x) }
|
@@ -929,7 +939,8 @@ module Io
|
|
929
939
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
930
940
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
931
941
|
query = {
|
932
|
-
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
|
942
|
+
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
943
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
933
944
|
}.delete_if { |k, v| v.nil? }
|
934
945
|
(x = credit_payment_form; x.is_a?(::Io::Flow::V0::Models::CreditPaymentForm) ? x : ::Io::Flow::V0::Models::CreditPaymentForm.new(x))
|
935
946
|
r = @client.request("/#{CGI.escape(organization)}/credit/payments").with_query(query).with_json(credit_payment_form.to_json).post
|
@@ -966,17 +977,22 @@ module Io
|
|
966
977
|
HttpClient::Preconditions.assert_class('key', key, String)
|
967
978
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
968
979
|
query = {
|
969
|
-
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
|
980
|
+
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
981
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
970
982
|
}.delete_if { |k, v| v.nil? }
|
971
983
|
(x = credit_payment_form; x.is_a?(::Io::Flow::V0::Models::CreditPaymentForm) ? x : ::Io::Flow::V0::Models::CreditPaymentForm.new(x))
|
972
984
|
r = @client.request("/#{CGI.escape(organization)}/credit/payments/#{CGI.escape(key)}").with_query(query).with_json(credit_payment_form.to_json).put
|
973
985
|
::Io::Flow::V0::Models::CreditPayment.new(r)
|
974
986
|
end
|
975
987
|
|
976
|
-
def delete_by_key(organization, key)
|
988
|
+
def delete_by_key(organization, key, incoming={})
|
977
989
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
978
990
|
HttpClient::Preconditions.assert_class('key', key, String)
|
979
|
-
|
991
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
992
|
+
query = {
|
993
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
994
|
+
}.delete_if { |k, v| v.nil? }
|
995
|
+
r = @client.request("/#{CGI.escape(organization)}/credit/payments/#{CGI.escape(key)}").with_query(query).delete
|
980
996
|
nil
|
981
997
|
end
|
982
998
|
|
@@ -1054,6 +1070,7 @@ module Io
|
|
1054
1070
|
:ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
|
1055
1071
|
: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),
|
1056
1072
|
:shipping_configuration_key => (x = opts.delete(:shipping_configuration_key); x.nil? ? nil : HttpClient::Preconditions.assert_class('shipping_configuration_key', x, String)),
|
1073
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String)),
|
1057
1074
|
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
1058
1075
|
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
1059
1076
|
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "position" : x), String)
|
@@ -1063,10 +1080,14 @@ module Io
|
|
1063
1080
|
end
|
1064
1081
|
|
1065
1082
|
# Add experience
|
1066
|
-
def post(organization, experience_form)
|
1083
|
+
def post(organization, experience_form, incoming={})
|
1067
1084
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1085
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1086
|
+
query = {
|
1087
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1088
|
+
}.delete_if { |k, v| v.nil? }
|
1068
1089
|
(x = experience_form; x.is_a?(::Io::Flow::V0::Models::ExperienceForm) ? x : ::Io::Flow::V0::Models::ExperienceForm.new(x))
|
1069
|
-
r = @client.request("/#{CGI.escape(organization)}/experiences").with_json(experience_form.to_json).post
|
1090
|
+
r = @client.request("/#{CGI.escape(organization)}/experiences").with_query(query).with_json(experience_form.to_json).post
|
1070
1091
|
::Io::Flow::V0::Models::Experience.new(r)
|
1071
1092
|
end
|
1072
1093
|
|
@@ -1081,7 +1102,8 @@ module Io
|
|
1081
1102
|
:experience => (x = opts.delete(:experience); x.nil? ? nil : HttpClient::Preconditions.assert_class('experience', x, String)),
|
1082
1103
|
:country => (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, String)),
|
1083
1104
|
:ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
|
1084
|
-
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String))
|
1105
|
+
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
|
1106
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1085
1107
|
}.delete_if { |k, v| v.nil? }
|
1086
1108
|
r = @client.request("/#{CGI.escape(organization)}/experiences/conversions/#{CGI.escape(base)}/#{CGI.escape(amount)}").with_query(query).get
|
1087
1109
|
::Io::Flow::V0::Models::PriceWithBase.new(r)
|
@@ -1101,6 +1123,7 @@ module Io
|
|
1101
1123
|
:ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
|
1102
1124
|
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
|
1103
1125
|
:language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)),
|
1126
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String)),
|
1104
1127
|
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
1105
1128
|
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
1106
1129
|
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String)
|
@@ -1119,7 +1142,8 @@ module Io
|
|
1119
1142
|
:country => (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, String)),
|
1120
1143
|
:ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
|
1121
1144
|
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
|
1122
|
-
:language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String))
|
1145
|
+
:language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)),
|
1146
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1123
1147
|
}.delete_if { |k, v| v.nil? }
|
1124
1148
|
r = @client.request("/#{CGI.escape(organization)}/experiences/items/#{CGI.escape(number)}").with_query(query).get
|
1125
1149
|
::Io::Flow::V0::Models::Item.new(r)
|
@@ -1140,6 +1164,7 @@ module Io
|
|
1140
1164
|
query = {
|
1141
1165
|
:id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
|
1142
1166
|
:key => (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, Array).map { |v| HttpClient::Preconditions.assert_class('key', v, String) }),
|
1167
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String)),
|
1143
1168
|
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
1144
1169
|
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
1145
1170
|
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
|
@@ -1148,18 +1173,26 @@ module Io
|
|
1148
1173
|
r.map { |x| ::Io::Flow::V0::Models::ExperienceVersion.new(x) }
|
1149
1174
|
end
|
1150
1175
|
|
1151
|
-
def get_currency_and_formats_by_experience_key(organization, experience_key)
|
1176
|
+
def get_currency_and_formats_by_experience_key(organization, experience_key, incoming={})
|
1152
1177
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1153
1178
|
HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
|
1154
|
-
|
1179
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1180
|
+
query = {
|
1181
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1182
|
+
}.delete_if { |k, v| v.nil? }
|
1183
|
+
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/currency/formats").with_query(query).get
|
1155
1184
|
::Io::Flow::V0::Models::ExperienceCurrencyFormat.new(r)
|
1156
1185
|
end
|
1157
1186
|
|
1158
|
-
def put_currency_and_formats_by_experience_key(organization, experience_key, experience_currency_format_form)
|
1187
|
+
def put_currency_and_formats_by_experience_key(organization, experience_key, experience_currency_format_form, incoming={})
|
1159
1188
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1160
1189
|
HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
|
1190
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1191
|
+
query = {
|
1192
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1193
|
+
}.delete_if { |k, v| v.nil? }
|
1161
1194
|
(x = experience_currency_format_form; x.is_a?(::Io::Flow::V0::Models::ExperienceCurrencyFormatForm) ? x : ::Io::Flow::V0::Models::ExperienceCurrencyFormatForm.new(x))
|
1162
|
-
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/currency/formats").with_json(experience_currency_format_form.to_json).put
|
1195
|
+
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/currency/formats").with_query(query).with_json(experience_currency_format_form.to_json).put
|
1163
1196
|
::Io::Flow::V0::Models::ExperienceCurrencyFormat.new(r)
|
1164
1197
|
end
|
1165
1198
|
|
@@ -1171,7 +1204,8 @@ module Io
|
|
1171
1204
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1172
1205
|
query = {
|
1173
1206
|
:q => (x = opts.delete(:q); x.nil? ? nil : HttpClient::Preconditions.assert_class('q', x, String)),
|
1174
|
-
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String))
|
1207
|
+
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
|
1208
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1175
1209
|
}.delete_if { |k, v| v.nil? }
|
1176
1210
|
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/local/items").with_query(query).get
|
1177
1211
|
r.map { |x| ::Io::Flow::V0::Models::LocalItem.new(x) }
|
@@ -1204,11 +1238,15 @@ module Io
|
|
1204
1238
|
r.map { |x| ::Io::Flow::V0::Models::ItemMargin.new(x) }
|
1205
1239
|
end
|
1206
1240
|
|
1207
|
-
def post_margins_by_experience_key(organization, experience_key, item_margin_post_form)
|
1241
|
+
def post_margins_by_experience_key(organization, experience_key, item_margin_post_form, incoming={})
|
1208
1242
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1209
1243
|
HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
|
1244
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1245
|
+
query = {
|
1246
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1247
|
+
}.delete_if { |k, v| v.nil? }
|
1210
1248
|
(x = item_margin_post_form; x.is_a?(::Io::Flow::V0::Models::ItemMarginPostForm) ? x : ::Io::Flow::V0::Models::ItemMarginPostForm.new(x))
|
1211
|
-
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/margins").with_json(item_margin_post_form.to_json).post
|
1249
|
+
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/margins").with_query(query).with_json(item_margin_post_form.to_json).post
|
1212
1250
|
::Io::Flow::V0::Models::ItemMargin.new(r)
|
1213
1251
|
end
|
1214
1252
|
|
@@ -1234,12 +1272,16 @@ module Io
|
|
1234
1272
|
::Io::Flow::V0::Models::ItemMargin.new(r)
|
1235
1273
|
end
|
1236
1274
|
|
1237
|
-
def put_margins_by_experience_key_and_key(organization, experience_key, key, item_margin_put_form)
|
1275
|
+
def put_margins_by_experience_key_and_key(organization, experience_key, key, item_margin_put_form, incoming={})
|
1238
1276
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1239
1277
|
HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
|
1240
1278
|
HttpClient::Preconditions.assert_class('key', key, String)
|
1279
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1280
|
+
query = {
|
1281
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1282
|
+
}.delete_if { |k, v| v.nil? }
|
1241
1283
|
(x = item_margin_put_form; x.is_a?(::Io::Flow::V0::Models::ItemMarginPutForm) ? x : ::Io::Flow::V0::Models::ItemMarginPutForm.new(x))
|
1242
|
-
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/margins/#{CGI.escape(key)}").with_json(item_margin_put_form.to_json).put
|
1284
|
+
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/margins/#{CGI.escape(key)}").with_query(query).with_json(item_margin_put_form.to_json).put
|
1243
1285
|
::Io::Flow::V0::Models::ItemMargin.new(r)
|
1244
1286
|
end
|
1245
1287
|
|
@@ -1257,7 +1299,8 @@ module Io
|
|
1257
1299
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1258
1300
|
query = {
|
1259
1301
|
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
1260
|
-
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer)
|
1302
|
+
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
1303
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1261
1304
|
}.delete_if { |k, v| v.nil? }
|
1262
1305
|
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/payment-method-types").with_query(query).get
|
1263
1306
|
r.map { |x| ::Io::Flow::V0::Models::PaymentMethodType.new(x) }
|
@@ -1271,7 +1314,8 @@ module Io
|
|
1271
1314
|
:payment_method_type => (x = opts.delete(:payment_method_type); x.nil? ? nil : HttpClient::Preconditions.assert_class('payment_method_type', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::PaymentMethodType) ? x : ::Io::Flow::V0::Models::PaymentMethodType.apply(x)).value }),
|
1272
1315
|
:tags => (x = opts.delete(:tags); x.nil? ? nil : HttpClient::Preconditions.assert_class('tags', x, Array).map { |v| HttpClient::Preconditions.assert_class('tags', v, String) }),
|
1273
1316
|
:amount => (x = opts.delete(:amount); x.nil? ? nil : HttpClient::Preconditions.assert_class('amount', x, String)),
|
1274
|
-
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String))
|
1317
|
+
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
|
1318
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1275
1319
|
}.delete_if { |k, v| v.nil? }
|
1276
1320
|
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/payment/method/rules").with_query(query).get
|
1277
1321
|
r.map { |x| ::Io::Flow::V0::Models::PaymentMethodRule.new(x) }
|
@@ -1279,11 +1323,15 @@ module Io
|
|
1279
1323
|
|
1280
1324
|
# Change the ordering or payment tags for an experience. Every post must
|
1281
1325
|
# include one entry for each payment method offered by Flow.
|
1282
|
-
def put_payment_and_method_and_rules_by_experience_key(organization, experience_key, experience_payment_method_rule_forms)
|
1326
|
+
def put_payment_and_method_and_rules_by_experience_key(organization, experience_key, experience_payment_method_rule_forms, incoming={})
|
1283
1327
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1284
1328
|
HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
|
1329
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1330
|
+
query = {
|
1331
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1332
|
+
}.delete_if { |k, v| v.nil? }
|
1285
1333
|
HttpClient::Preconditions.assert_class('experience_payment_method_rule_forms', experience_payment_method_rule_forms, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ExperiencePaymentMethodRuleForm) ? x : ::Io::Flow::V0::Models::ExperiencePaymentMethodRuleForm.new(x)) }
|
1286
|
-
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/payment/method/rules").with_json(experience_payment_method_rule_forms.map { |o| o.to_hash }.to_json).put
|
1334
|
+
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/payment/method/rules").with_query(query).with_json(experience_payment_method_rule_forms.map { |o| o.to_hash }.to_json).put
|
1287
1335
|
r.map { |x| ::Io::Flow::V0::Models::PaymentMethodRule.new(x) }
|
1288
1336
|
end
|
1289
1337
|
|
@@ -1302,19 +1350,27 @@ module Io
|
|
1302
1350
|
r.map { |x| ::Io::Flow::V0::Models::ExperiencePriceBookMapping.new(x) }
|
1303
1351
|
end
|
1304
1352
|
|
1305
|
-
def post_price_and_books_by_experience_key(organization, experience_key, experience_price_book_mapping_form)
|
1353
|
+
def post_price_and_books_by_experience_key(organization, experience_key, experience_price_book_mapping_form, incoming={})
|
1306
1354
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1307
1355
|
HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
|
1356
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1357
|
+
query = {
|
1358
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1359
|
+
}.delete_if { |k, v| v.nil? }
|
1308
1360
|
(x = experience_price_book_mapping_form; x.is_a?(::Io::Flow::V0::Models::ExperiencePriceBookMappingForm) ? x : ::Io::Flow::V0::Models::ExperiencePriceBookMappingForm.new(x))
|
1309
|
-
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/price/books").with_json(experience_price_book_mapping_form.to_json).post
|
1361
|
+
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/price/books").with_query(query).with_json(experience_price_book_mapping_form.to_json).post
|
1310
1362
|
::Io::Flow::V0::Models::ExperiencePriceBookMapping.new(r)
|
1311
1363
|
end
|
1312
1364
|
|
1313
|
-
def put_price_and_books_by_experience_key(organization, experience_key, experience_price_book_mapping_put_form)
|
1365
|
+
def put_price_and_books_by_experience_key(organization, experience_key, experience_price_book_mapping_put_form, incoming={})
|
1314
1366
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1315
1367
|
HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
|
1368
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1369
|
+
query = {
|
1370
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1371
|
+
}.delete_if { |k, v| v.nil? }
|
1316
1372
|
(x = experience_price_book_mapping_put_form; x.is_a?(::Io::Flow::V0::Models::ExperiencePriceBookMappingPutForm) ? x : ::Io::Flow::V0::Models::ExperiencePriceBookMappingPutForm.new(x))
|
1317
|
-
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/price/books").with_json(experience_price_book_mapping_put_form.to_json).put
|
1373
|
+
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/price/books").with_query(query).with_json(experience_price_book_mapping_put_form.to_json).put
|
1318
1374
|
r.map { |x| ::Io::Flow::V0::Models::ExperiencePriceBookMapping.new(x) }
|
1319
1375
|
end
|
1320
1376
|
|
@@ -1335,37 +1391,53 @@ module Io
|
|
1335
1391
|
end
|
1336
1392
|
|
1337
1393
|
# Returns information about a specific experience.
|
1338
|
-
def get_by_key(organization, key)
|
1394
|
+
def get_by_key(organization, key, incoming={})
|
1339
1395
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1340
1396
|
HttpClient::Preconditions.assert_class('key', key, String)
|
1341
|
-
|
1397
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1398
|
+
query = {
|
1399
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1400
|
+
}.delete_if { |k, v| v.nil? }
|
1401
|
+
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(key)}").with_query(query).get
|
1342
1402
|
::Io::Flow::V0::Models::Experience.new(r)
|
1343
1403
|
end
|
1344
1404
|
|
1345
1405
|
# Update experience with the specified key, creating if it does not exist.
|
1346
|
-
def put_by_key(organization, key, experience_form)
|
1406
|
+
def put_by_key(organization, key, experience_form, incoming={})
|
1347
1407
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1348
1408
|
HttpClient::Preconditions.assert_class('key', key, String)
|
1409
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1410
|
+
query = {
|
1411
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1412
|
+
}.delete_if { |k, v| v.nil? }
|
1349
1413
|
(x = experience_form; x.is_a?(::Io::Flow::V0::Models::ExperienceForm) ? x : ::Io::Flow::V0::Models::ExperienceForm.new(x))
|
1350
|
-
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(key)}").with_json(experience_form.to_json).put
|
1414
|
+
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(key)}").with_query(query).with_json(experience_form.to_json).put
|
1351
1415
|
::Io::Flow::V0::Models::Experience.new(r)
|
1352
1416
|
end
|
1353
1417
|
|
1354
1418
|
# Delete the experience with this key
|
1355
|
-
def delete_by_key(organization, key)
|
1419
|
+
def delete_by_key(organization, key, incoming={})
|
1356
1420
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1357
1421
|
HttpClient::Preconditions.assert_class('key', key, String)
|
1358
|
-
|
1422
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1423
|
+
query = {
|
1424
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1425
|
+
}.delete_if { |k, v| v.nil? }
|
1426
|
+
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(key)}").with_query(query).delete
|
1359
1427
|
nil
|
1360
1428
|
end
|
1361
1429
|
|
1362
1430
|
# Clones the experience with the specified key, using data from
|
1363
1431
|
# experience_clone_form.
|
1364
|
-
def post_clone_by_key(organization, key, experience_clone_form)
|
1432
|
+
def post_clone_by_key(organization, key, experience_clone_form, incoming={})
|
1365
1433
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1366
1434
|
HttpClient::Preconditions.assert_class('key', key, String)
|
1435
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1436
|
+
query = {
|
1437
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1438
|
+
}.delete_if { |k, v| v.nil? }
|
1367
1439
|
(x = experience_clone_form; x.is_a?(::Io::Flow::V0::Models::ExperienceCloneForm) ? x : ::Io::Flow::V0::Models::ExperienceCloneForm.new(x))
|
1368
|
-
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(key)}/clone").with_json(experience_clone_form.to_json).post
|
1440
|
+
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(key)}/clone").with_query(query).with_json(experience_clone_form.to_json).post
|
1369
1441
|
::Io::Flow::V0::Models::ExperienceClone.new(r)
|
1370
1442
|
end
|
1371
1443
|
|
@@ -1392,43 +1464,60 @@ module Io
|
|
1392
1464
|
:ship_from_province => (x = opts.delete(:ship_from_province); x.nil? ? nil : HttpClient::Preconditions.assert_class('ship_from_province', x, String)),
|
1393
1465
|
:ship_to_country => (x = opts.delete(:ship_to_country); x.nil? ? nil : HttpClient::Preconditions.assert_class('ship_to_country', x, String)),
|
1394
1466
|
:ship_to_province => (x = opts.delete(:ship_to_province); x.nil? ? nil : HttpClient::Preconditions.assert_class('ship_to_province', x, String)),
|
1395
|
-
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String))
|
1467
|
+
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
|
1468
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1396
1469
|
}.delete_if { |k, v| v.nil? }
|
1397
1470
|
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(key)}/items/#{CGI.escape(number)}/price").with_query(query).get
|
1398
1471
|
::Io::Flow::V0::Models::PriceCheck.new(r)
|
1399
1472
|
end
|
1400
1473
|
|
1401
1474
|
# Get the pricing settings for this experience
|
1402
|
-
def get_pricing_by_key(organization, key)
|
1475
|
+
def get_pricing_by_key(organization, key, incoming={})
|
1403
1476
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1404
1477
|
HttpClient::Preconditions.assert_class('key', key, String)
|
1405
|
-
|
1478
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1479
|
+
query = {
|
1480
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1481
|
+
}.delete_if { |k, v| v.nil? }
|
1482
|
+
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(key)}/pricing").with_query(query).get
|
1406
1483
|
::Io::Flow::V0::Models::Pricing.new(r)
|
1407
1484
|
end
|
1408
1485
|
|
1409
1486
|
# Update the pricing settings for this experience
|
1410
|
-
def put_pricing_by_key(organization, key, pricing)
|
1487
|
+
def put_pricing_by_key(organization, key, pricing, incoming={})
|
1411
1488
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1412
1489
|
HttpClient::Preconditions.assert_class('key', key, String)
|
1490
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1491
|
+
query = {
|
1492
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1493
|
+
}.delete_if { |k, v| v.nil? }
|
1413
1494
|
(x = pricing; x.is_a?(::Io::Flow::V0::Models::Pricing) ? x : ::Io::Flow::V0::Models::Pricing.new(x))
|
1414
|
-
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(key)}/pricing").with_json(pricing.to_json).put
|
1495
|
+
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(key)}/pricing").with_query(query).with_json(pricing.to_json).put
|
1415
1496
|
::Io::Flow::V0::Models::Pricing.new(r)
|
1416
1497
|
end
|
1417
1498
|
|
1418
1499
|
# Get available promotions for the experience
|
1419
|
-
def get_promotions_and_available_by_key(organization, key)
|
1500
|
+
def get_promotions_and_available_by_key(organization, key, incoming={})
|
1420
1501
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1421
1502
|
HttpClient::Preconditions.assert_class('key', key, String)
|
1422
|
-
|
1503
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1504
|
+
query = {
|
1505
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1506
|
+
}.delete_if { |k, v| v.nil? }
|
1507
|
+
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(key)}/promotions/available").with_query(query).get
|
1423
1508
|
r.map { |x| ::Io::Flow::V0::Models::Promotion.from_json(x) }
|
1424
1509
|
end
|
1425
1510
|
|
1426
1511
|
# Updates the status of a given experience.
|
1427
|
-
def put_status_by_key(organization, key, experience_status_form)
|
1512
|
+
def put_status_by_key(organization, key, experience_status_form, incoming={})
|
1428
1513
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1429
1514
|
HttpClient::Preconditions.assert_class('key', key, String)
|
1515
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1516
|
+
query = {
|
1517
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1518
|
+
}.delete_if { |k, v| v.nil? }
|
1430
1519
|
(x = experience_status_form; x.is_a?(::Io::Flow::V0::Models::ExperienceStatusForm) ? x : ::Io::Flow::V0::Models::ExperienceStatusForm.new(x))
|
1431
|
-
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(key)}/status").with_json(experience_status_form.to_json).put
|
1520
|
+
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(key)}/status").with_query(query).with_json(experience_status_form.to_json).put
|
1432
1521
|
::Io::Flow::V0::Models::Experience.new(r)
|
1433
1522
|
end
|
1434
1523
|
|
@@ -1440,18 +1529,26 @@ module Io
|
|
1440
1529
|
@client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
|
1441
1530
|
end
|
1442
1531
|
|
1443
|
-
def get(organization, experience_key)
|
1532
|
+
def get(organization, experience_key, incoming={})
|
1444
1533
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1445
1534
|
HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
|
1446
|
-
|
1535
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1536
|
+
query = {
|
1537
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1538
|
+
}.delete_if { |k, v| v.nil? }
|
1539
|
+
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/settings/checkout").with_query(query).get
|
1447
1540
|
::Io::Flow::V0::Models::ExperienceCheckoutSettings.new(r)
|
1448
1541
|
end
|
1449
1542
|
|
1450
|
-
def put(organization, experience_key, experience_checkout_settings_form)
|
1543
|
+
def put(organization, experience_key, experience_checkout_settings_form, incoming={})
|
1451
1544
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1452
1545
|
HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
|
1546
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1547
|
+
query = {
|
1548
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1549
|
+
}.delete_if { |k, v| v.nil? }
|
1453
1550
|
(x = experience_checkout_settings_form; x.is_a?(::Io::Flow::V0::Models::ExperienceCheckoutSettingsForm) ? x : ::Io::Flow::V0::Models::ExperienceCheckoutSettingsForm.new(x))
|
1454
|
-
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/settings/checkout").with_json(experience_checkout_settings_form.to_json).put
|
1551
|
+
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/settings/checkout").with_query(query).with_json(experience_checkout_settings_form.to_json).put
|
1455
1552
|
::Io::Flow::V0::Models::ExperienceCheckoutSettings.new(r)
|
1456
1553
|
end
|
1457
1554
|
|
@@ -1468,7 +1565,8 @@ module Io
|
|
1468
1565
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1469
1566
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1470
1567
|
query = {
|
1471
|
-
:region_id => (x = opts.delete(:region_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('region_id', x, String))
|
1568
|
+
:region_id => (x = opts.delete(:region_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('region_id', x, String)),
|
1569
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1472
1570
|
}.delete_if { |k, v| v.nil? }
|
1473
1571
|
r = @client.request("/#{CGI.escape(organization)}/experience/defaults").with_query(query).get
|
1474
1572
|
::Io::Flow::V0::Models::ExperienceDefaults.new(r)
|
@@ -1489,11 +1587,15 @@ module Io
|
|
1489
1587
|
::Io::Flow::V0::Models::ExperienceLogisticsSettings.new(r)
|
1490
1588
|
end
|
1491
1589
|
|
1492
|
-
def put(organization, experience_key, experience_logistics_settings_put_form)
|
1590
|
+
def put(organization, experience_key, experience_logistics_settings_put_form, incoming={})
|
1493
1591
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1494
1592
|
HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
|
1593
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1594
|
+
query = {
|
1595
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1596
|
+
}.delete_if { |k, v| v.nil? }
|
1495
1597
|
(x = experience_logistics_settings_put_form; x.is_a?(::Io::Flow::V0::Models::ExperienceLogisticsSettingsPutForm) ? x : ::Io::Flow::V0::Models::ExperienceLogisticsSettingsPutForm.new(x))
|
1496
|
-
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/settings/logistics").with_json(experience_logistics_settings_put_form.to_json).put
|
1598
|
+
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/settings/logistics").with_query(query).with_json(experience_logistics_settings_put_form.to_json).put
|
1497
1599
|
::Io::Flow::V0::Models::ExperienceLogisticsSettings.new(r)
|
1498
1600
|
end
|
1499
1601
|
|
@@ -1708,6 +1810,7 @@ module Io
|
|
1708
1810
|
:customer_number => (x = opts.delete(:customer_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('customer_number', x, String)),
|
1709
1811
|
:submitted_at_on_or_after => (x = opts.delete(:submitted_at_on_or_after); x.nil? ? nil : HttpClient::Preconditions.assert_class('submitted_at_on_or_after', HttpClient::Helper.to_date_time_iso8601(x), DateTime)),
|
1710
1812
|
:romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) }),
|
1813
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String)),
|
1711
1814
|
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
1712
1815
|
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
1713
1816
|
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "-created_at" : x), String),
|
@@ -1730,7 +1833,8 @@ module Io
|
|
1730
1833
|
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
|
1731
1834
|
:language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)),
|
1732
1835
|
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
1733
|
-
:romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) })
|
1836
|
+
:romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) }),
|
1837
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1734
1838
|
}.delete_if { |k, v| v.nil? }
|
1735
1839
|
(x = order_form; x.is_a?(::Io::Flow::V0::Models::OrderForm) ? x : ::Io::Flow::V0::Models::OrderForm.new(x))
|
1736
1840
|
r = @client.request("/#{CGI.escape(organization)}/orders").with_query(query).with_json(order_form.to_json).post
|
@@ -1744,7 +1848,8 @@ module Io
|
|
1744
1848
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1745
1849
|
query = {
|
1746
1850
|
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
1747
|
-
:romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) })
|
1851
|
+
:romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) }),
|
1852
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1748
1853
|
}.delete_if { |k, v| v.nil? }
|
1749
1854
|
r = @client.request("/#{CGI.escape(organization)}/orders/identifier/#{CGI.escape(identifier)}").with_query(query).get
|
1750
1855
|
::Io::Flow::V0::Models::Order.new(r)
|
@@ -1761,7 +1866,8 @@ module Io
|
|
1761
1866
|
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
1762
1867
|
:experience => (x = opts.delete(:experience); x.nil? ? nil : HttpClient::Preconditions.assert_class('experience', x, String)),
|
1763
1868
|
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
|
1764
|
-
:show_selections_only => (x = opts.delete(:show_selections_only); x.nil? ? nil : HttpClient::Preconditions.assert_boolean('show_selections_only', x))
|
1869
|
+
:show_selections_only => (x = opts.delete(:show_selections_only); x.nil? ? nil : HttpClient::Preconditions.assert_boolean('show_selections_only', x)),
|
1870
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1765
1871
|
}.delete_if { |k, v| v.nil? }
|
1766
1872
|
(x = order_with_discounts_form; x.is_a?(::Io::Flow::V0::Models::OrderWithDiscountsForm) ? x : ::Io::Flow::V0::Models::OrderWithDiscountsForm.new(x))
|
1767
1873
|
r = @client.request("/#{CGI.escape(organization)}/orders/submissions").with_query(query).with_json(order_with_discounts_form.to_json).post
|
@@ -1791,7 +1897,8 @@ module Io
|
|
1791
1897
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1792
1898
|
query = {
|
1793
1899
|
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
1794
|
-
:romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) })
|
1900
|
+
:romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) }),
|
1901
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1795
1902
|
}.delete_if { |k, v| v.nil? }
|
1796
1903
|
r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}").with_query(query).get
|
1797
1904
|
::Io::Flow::V0::Models::Order.new(r)
|
@@ -1811,7 +1918,8 @@ module Io
|
|
1811
1918
|
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
|
1812
1919
|
:language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)),
|
1813
1920
|
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
1814
|
-
:romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) })
|
1921
|
+
:romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) }),
|
1922
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1815
1923
|
}.delete_if { |k, v| v.nil? }
|
1816
1924
|
(x = order_put_form; x.is_a?(::Io::Flow::V0::Models::OrderPutForm) ? x : ::Io::Flow::V0::Models::OrderPutForm.new(x))
|
1817
1925
|
r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}").with_query(query).with_json(order_put_form.to_json).put
|
@@ -1842,7 +1950,8 @@ module Io
|
|
1842
1950
|
HttpClient::Preconditions.assert_class('number', number, String)
|
1843
1951
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1844
1952
|
query = {
|
1845
|
-
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
|
1953
|
+
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
1954
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1846
1955
|
}.delete_if { |k, v| v.nil? }
|
1847
1956
|
(x = authorization_form; x.is_a?(::Io::Flow::V0::Models::AuthorizationForm) ? x : ::Io::Flow::V0::Models::AuthorizationForm.from_json(x))
|
1848
1957
|
r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}/authorizations").with_query(query).with_json(authorization_form.to_json).post
|
@@ -1850,21 +1959,38 @@ module Io
|
|
1850
1959
|
end
|
1851
1960
|
|
1852
1961
|
# Updates an order's destination address
|
1853
|
-
def put_destination_by_number(organization, number, order_destination_put_form)
|
1962
|
+
def put_destination_by_number(organization, number, order_destination_put_form, incoming={})
|
1854
1963
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1855
1964
|
HttpClient::Preconditions.assert_class('number', number, String)
|
1965
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1966
|
+
query = {
|
1967
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1968
|
+
}.delete_if { |k, v| v.nil? }
|
1856
1969
|
(x = order_destination_put_form; x.is_a?(::Io::Flow::V0::Models::OrderDestinationPutForm) ? x : ::Io::Flow::V0::Models::OrderDestinationPutForm.new(x))
|
1857
|
-
r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}/destination").with_json(order_destination_put_form.to_json).put
|
1970
|
+
r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}/destination").with_query(query).with_json(order_destination_put_form.to_json).put
|
1858
1971
|
::Io::Flow::V0::Models::Order.new(r)
|
1859
1972
|
end
|
1860
1973
|
|
1861
|
-
def put_inventory_and_reservations_by_number(organization, number)
|
1974
|
+
def put_inventory_and_reservations_by_number(organization, number, incoming={})
|
1862
1975
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1863
1976
|
HttpClient::Preconditions.assert_class('number', number, String)
|
1864
|
-
|
1977
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1978
|
+
query = {
|
1979
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1980
|
+
}.delete_if { |k, v| v.nil? }
|
1981
|
+
r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}/inventory/reservations").with_query(query).put
|
1865
1982
|
::Io::Flow::V0::Models::Reservation.new(r)
|
1866
1983
|
end
|
1867
1984
|
|
1985
|
+
# Creates an order payment by applying the authorization to the order.
|
1986
|
+
def post_payments_by_number(organization, number, authorization)
|
1987
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1988
|
+
HttpClient::Preconditions.assert_class('number', number, String)
|
1989
|
+
(x = authorization; x.is_a?(::Io::Flow::V0::Models::Authorization) ? x : ::Io::Flow::V0::Models::Authorization.from_json(x))
|
1990
|
+
r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}/payments").with_json(authorization.to_json).post
|
1991
|
+
::Io::Flow::V0::Models::Order.new(r)
|
1992
|
+
end
|
1993
|
+
|
1868
1994
|
# Creates a free shipping promotion for this order, automatically applying it
|
1869
1995
|
# to the order if the order meets the defined promotion trigger.
|
1870
1996
|
def put_promotions_and_free_shipping_by_number_and_key(organization, number, key, free_shipping_order_promotion_form, incoming={})
|
@@ -1873,7 +1999,8 @@ module Io
|
|
1873
1999
|
HttpClient::Preconditions.assert_class('key', key, String)
|
1874
2000
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1875
2001
|
query = {
|
1876
|
-
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
|
2002
|
+
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
2003
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1877
2004
|
}.delete_if { |k, v| v.nil? }
|
1878
2005
|
(x = free_shipping_order_promotion_form; x.is_a?(::Io::Flow::V0::Models::FreeShippingOrderPromotionForm) ? x : ::Io::Flow::V0::Models::FreeShippingOrderPromotionForm.new(x))
|
1879
2006
|
r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}/promotions/#{CGI.escape(key)}/free_shipping").with_query(query).with_json(free_shipping_order_promotion_form.to_json).put
|
@@ -1897,7 +2024,8 @@ module Io
|
|
1897
2024
|
HttpClient::Preconditions.assert_class('number', number, String)
|
1898
2025
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1899
2026
|
query = {
|
1900
|
-
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
|
2027
|
+
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
2028
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1901
2029
|
}.delete_if { |k, v| v.nil? }
|
1902
2030
|
(x = order_submission_form; x.is_a?(::Io::Flow::V0::Models::OrderSubmissionForm) ? x : ::Io::Flow::V0::Models::OrderSubmissionForm.new(x))
|
1903
2031
|
r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}/submissions").with_query(query).with_json(order_submission_form.to_json).put
|
@@ -1906,11 +2034,15 @@ module Io
|
|
1906
2034
|
|
1907
2035
|
# Validates a tax registration number, proxying to underlying services and
|
1908
2036
|
# recording the result on the order.
|
1909
|
-
def put_tax_and_registration_by_number(organization, number, tax_registration_form)
|
2037
|
+
def put_tax_and_registration_by_number(organization, number, tax_registration_form, incoming={})
|
1910
2038
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1911
2039
|
HttpClient::Preconditions.assert_class('number', number, String)
|
2040
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
2041
|
+
query = {
|
2042
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
2043
|
+
}.delete_if { |k, v| v.nil? }
|
1912
2044
|
(x = tax_registration_form; x.is_a?(::Io::Flow::V0::Models::TaxRegistrationForm) ? x : ::Io::Flow::V0::Models::TaxRegistrationForm.new(x))
|
1913
|
-
r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}/tax/registration").with_json(tax_registration_form.to_json).put
|
2045
|
+
r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}/tax/registration").with_query(query).with_json(tax_registration_form.to_json).put
|
1914
2046
|
::Io::Flow::V0::Models::TaxRegistration.new(r)
|
1915
2047
|
end
|
1916
2048
|
|
@@ -1955,7 +2087,8 @@ module Io
|
|
1955
2087
|
:ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
|
1956
2088
|
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
|
1957
2089
|
:language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)),
|
1958
|
-
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
|
2090
|
+
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
2091
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1959
2092
|
}.delete_if { |k, v| v.nil? }
|
1960
2093
|
(x = order_put_form; x.is_a?(::Io::Flow::V0::Models::OrderPutForm) ? x : ::Io::Flow::V0::Models::OrderPutForm.new(x))
|
1961
2094
|
r = @client.request("/#{CGI.escape(organization)}/order/builders").with_query(query).with_json(order_put_form.to_json).post
|
@@ -1972,7 +2105,8 @@ module Io
|
|
1972
2105
|
:ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
|
1973
2106
|
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
|
1974
2107
|
:language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)),
|
1975
|
-
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
|
2108
|
+
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
2109
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1976
2110
|
}.delete_if { |k, v| v.nil? }
|
1977
2111
|
(x = order_put_form; x.is_a?(::Io::Flow::V0::Models::OrderPutForm) ? x : ::Io::Flow::V0::Models::OrderPutForm.new(x))
|
1978
2112
|
r = @client.request("/#{CGI.escape(organization)}/order/builders/carts/#{CGI.escape(number)}").with_query(query).with_json(order_put_form.to_json).put
|
@@ -1987,7 +2121,8 @@ module Io
|
|
1987
2121
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1988
2122
|
query = {
|
1989
2123
|
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
1990
|
-
:romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) })
|
2124
|
+
:romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) }),
|
2125
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
1991
2126
|
}.delete_if { |k, v| v.nil? }
|
1992
2127
|
r = @client.request("/#{CGI.escape(organization)}/order/builders/#{CGI.escape(number)}").with_query(query).get
|
1993
2128
|
::Io::Flow::V0::Models::OrderBuilder.new(r)
|
@@ -2003,7 +2138,8 @@ module Io
|
|
2003
2138
|
:ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
|
2004
2139
|
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
|
2005
2140
|
:language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)),
|
2006
|
-
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
|
2141
|
+
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
2142
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
2007
2143
|
}.delete_if { |k, v| v.nil? }
|
2008
2144
|
(x = order_put_form; x.is_a?(::Io::Flow::V0::Models::OrderPutForm) ? x : ::Io::Flow::V0::Models::OrderPutForm.new(x))
|
2009
2145
|
r = @client.request("/#{CGI.escape(organization)}/order/builders/#{CGI.escape(number)}").with_query(query).with_json(order_put_form.to_json).put
|
@@ -2015,7 +2151,8 @@ module Io
|
|
2015
2151
|
HttpClient::Preconditions.assert_class('number', number, String)
|
2016
2152
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
2017
2153
|
query = {
|
2018
|
-
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
|
2154
|
+
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
2155
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
2019
2156
|
}.delete_if { |k, v| v.nil? }
|
2020
2157
|
(x = order_builder_attributes_form; x.is_a?(::Io::Flow::V0::Models::OrderBuilderAttributesForm) ? x : ::Io::Flow::V0::Models::OrderBuilderAttributesForm.new(x))
|
2021
2158
|
r = @client.request("/#{CGI.escape(organization)}/order/builders/#{CGI.escape(number)}/attributes").with_query(query).with_json(order_builder_attributes_form.to_json).put
|
@@ -2027,7 +2164,8 @@ module Io
|
|
2027
2164
|
HttpClient::Preconditions.assert_class('number', number, String)
|
2028
2165
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
2029
2166
|
query = {
|
2030
|
-
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
|
2167
|
+
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
2168
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
2031
2169
|
}.delete_if { |k, v| v.nil? }
|
2032
2170
|
(x = order_builder_destination_country_form; x.is_a?(::Io::Flow::V0::Models::OrderBuilderDestinationCountryForm) ? x : ::Io::Flow::V0::Models::OrderBuilderDestinationCountryForm.new(x))
|
2033
2171
|
r = @client.request("/#{CGI.escape(organization)}/order/builders/#{CGI.escape(number)}/country").with_query(query).with_json(order_builder_destination_country_form.to_json).put
|
@@ -2039,7 +2177,8 @@ module Io
|
|
2039
2177
|
HttpClient::Preconditions.assert_class('number', number, String)
|
2040
2178
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
2041
2179
|
query = {
|
2042
|
-
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
|
2180
|
+
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
2181
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
2043
2182
|
}.delete_if { |k, v| v.nil? }
|
2044
2183
|
(x = order_builder_destination_form; x.is_a?(::Io::Flow::V0::Models::OrderBuilderDestinationForm) ? x : ::Io::Flow::V0::Models::OrderBuilderDestinationForm.new(x))
|
2045
2184
|
r = @client.request("/#{CGI.escape(organization)}/order/builders/#{CGI.escape(number)}/destination").with_query(query).with_json(order_builder_destination_form.to_json).put
|
@@ -2051,7 +2190,8 @@ module Io
|
|
2051
2190
|
HttpClient::Preconditions.assert_class('number', number, String)
|
2052
2191
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
2053
2192
|
query = {
|
2054
|
-
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
|
2193
|
+
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
2194
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
2055
2195
|
}.delete_if { |k, v| v.nil? }
|
2056
2196
|
(x = order_builder_delivered_duty_form; x.is_a?(::Io::Flow::V0::Models::OrderBuilderDeliveredDutyForm) ? x : ::Io::Flow::V0::Models::OrderBuilderDeliveredDutyForm.new(x))
|
2057
2197
|
r = @client.request("/#{CGI.escape(organization)}/order/builders/#{CGI.escape(number)}/duty").with_query(query).with_json(order_builder_delivered_duty_form.to_json).put
|
@@ -2064,13 +2204,71 @@ module Io
|
|
2064
2204
|
HttpClient::Preconditions.assert_class('number', number, String)
|
2065
2205
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
2066
2206
|
query = {
|
2067
|
-
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
|
2207
|
+
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
2208
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
2068
2209
|
}.delete_if { |k, v| v.nil? }
|
2069
2210
|
(x = order_builder_customer_invoice_address_form; x.is_a?(::Io::Flow::V0::Models::OrderBuilderCustomerInvoiceAddressForm) ? x : ::Io::Flow::V0::Models::OrderBuilderCustomerInvoiceAddressForm.new(x))
|
2070
2211
|
r = @client.request("/#{CGI.escape(organization)}/order/builders/#{CGI.escape(number)}/invoice/address").with_query(query).with_json(order_builder_customer_invoice_address_form.to_json).put
|
2071
2212
|
::Io::Flow::V0::Models::OrderBuilder.new(r)
|
2072
2213
|
end
|
2073
2214
|
|
2215
|
+
# Adds a line item to the order.
|
2216
|
+
def post_lines_by_number(organization, number, line_item_form)
|
2217
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
2218
|
+
HttpClient::Preconditions.assert_class('number', number, String)
|
2219
|
+
(x = line_item_form; x.is_a?(::Io::Flow::V0::Models::LineItemForm) ? x : ::Io::Flow::V0::Models::LineItemForm.new(x))
|
2220
|
+
r = @client.request("/#{CGI.escape(organization)}/order/builders/#{CGI.escape(number)}/lines").with_json(line_item_form.to_json).post
|
2221
|
+
::Io::Flow::V0::Models::Order.new(r)
|
2222
|
+
end
|
2223
|
+
|
2224
|
+
# Replaces all line items in the order.
|
2225
|
+
def put_lines_by_number(organization, number, line_item_forms)
|
2226
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
2227
|
+
HttpClient::Preconditions.assert_class('number', number, String)
|
2228
|
+
HttpClient::Preconditions.assert_class('line_item_forms', line_item_forms, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::LineItemForm) ? x : ::Io::Flow::V0::Models::LineItemForm.new(x)) }
|
2229
|
+
r = @client.request("/#{CGI.escape(organization)}/order/builders/#{CGI.escape(number)}/lines").with_json(line_item_forms.map { |o| o.to_hash }.to_json).put
|
2230
|
+
::Io::Flow::V0::Models::Order.new(r)
|
2231
|
+
end
|
2232
|
+
|
2233
|
+
# Replaces line item in the order specifed by the line item id.
|
2234
|
+
def put_lines_by_number_and_id(organization, number, id, line_item_form)
|
2235
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
2236
|
+
HttpClient::Preconditions.assert_class('number', number, String)
|
2237
|
+
HttpClient::Preconditions.assert_class('id', id, String)
|
2238
|
+
(x = line_item_form; x.is_a?(::Io::Flow::V0::Models::LineItemForm) ? x : ::Io::Flow::V0::Models::LineItemForm.new(x))
|
2239
|
+
r = @client.request("/#{CGI.escape(organization)}/order/builders/#{CGI.escape(number)}/lines/#{CGI.escape(id)}").with_json(line_item_form.to_json).put
|
2240
|
+
::Io::Flow::V0::Models::Order.new(r)
|
2241
|
+
end
|
2242
|
+
|
2243
|
+
# Deletes line item in the order specifed by the line item id.
|
2244
|
+
def delete_lines_by_number_and_id(organization, number, id)
|
2245
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
2246
|
+
HttpClient::Preconditions.assert_class('number', number, String)
|
2247
|
+
HttpClient::Preconditions.assert_class('id', id, String)
|
2248
|
+
r = @client.request("/#{CGI.escape(organization)}/order/builders/#{CGI.escape(number)}/lines/#{CGI.escape(id)}").delete
|
2249
|
+
::Io::Flow::V0::Models::OrderBuilder.new(r)
|
2250
|
+
end
|
2251
|
+
|
2252
|
+
# Updates line item attributes in the order specifed by the line item id.
|
2253
|
+
def put_lines_and_attributes_by_number_and_id(organization, number, id, line_item_attributes_form)
|
2254
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
2255
|
+
HttpClient::Preconditions.assert_class('number', number, String)
|
2256
|
+
HttpClient::Preconditions.assert_class('id', id, String)
|
2257
|
+
(x = line_item_attributes_form; x.is_a?(::Io::Flow::V0::Models::LineItemAttributesForm) ? x : ::Io::Flow::V0::Models::LineItemAttributesForm.new(x))
|
2258
|
+
r = @client.request("/#{CGI.escape(organization)}/order/builders/#{CGI.escape(number)}/lines/#{CGI.escape(id)}/attributes").with_json(line_item_attributes_form.to_json).put
|
2259
|
+
::Io::Flow::V0::Models::Order.new(r)
|
2260
|
+
end
|
2261
|
+
|
2262
|
+
# Updates line item quantity in the order specifed by the line item id.
|
2263
|
+
def put_lines_and_quantity_by_number_and_id(organization, number, id, line_item_quantity_form)
|
2264
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
2265
|
+
HttpClient::Preconditions.assert_class('number', number, String)
|
2266
|
+
HttpClient::Preconditions.assert_class('id', id, String)
|
2267
|
+
(x = line_item_quantity_form; x.is_a?(::Io::Flow::V0::Models::LineItemQuantityForm) ? x : ::Io::Flow::V0::Models::LineItemQuantityForm.new(x))
|
2268
|
+
r = @client.request("/#{CGI.escape(organization)}/order/builders/#{CGI.escape(number)}/lines/#{CGI.escape(id)}/quantity").with_json(line_item_quantity_form.to_json).put
|
2269
|
+
::Io::Flow::V0::Models::Order.new(r)
|
2270
|
+
end
|
2271
|
+
|
2074
2272
|
# Validates a tax registration number, proxying to underlying services and
|
2075
2273
|
# recording the result on the order.
|
2076
2274
|
def put_tax_and_registration_by_number(organization, number, tax_registration_form, incoming={})
|
@@ -2078,7 +2276,8 @@ module Io
|
|
2078
2276
|
HttpClient::Preconditions.assert_class('number', number, String)
|
2079
2277
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
2080
2278
|
query = {
|
2081
|
-
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
|
2279
|
+
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
2280
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
2082
2281
|
}.delete_if { |k, v| v.nil? }
|
2083
2282
|
(x = tax_registration_form; x.is_a?(::Io::Flow::V0::Models::TaxRegistrationForm) ? x : ::Io::Flow::V0::Models::TaxRegistrationForm.new(x))
|
2084
2283
|
r = @client.request("/#{CGI.escape(organization)}/order/builders/#{CGI.escape(number)}/tax/registration").with_query(query).with_json(tax_registration_form.to_json).put
|
@@ -2107,7 +2306,8 @@ module Io
|
|
2107
2306
|
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
|
2108
2307
|
:language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)),
|
2109
2308
|
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
2110
|
-
:romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) })
|
2309
|
+
:romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) }),
|
2310
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
2111
2311
|
}.delete_if { |k, v| v.nil? }
|
2112
2312
|
(x = order_estimate_form; x.is_a?(::Io::Flow::V0::Models::OrderEstimateForm) ? x : ::Io::Flow::V0::Models::OrderEstimateForm.new(x))
|
2113
2313
|
r = @client.request("/#{CGI.escape(organization)}/order-estimates").with_query(query).with_json(order_estimate_form.to_json).post
|
@@ -2120,7 +2320,8 @@ module Io
|
|
2120
2320
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
2121
2321
|
query = {
|
2122
2322
|
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
2123
|
-
:romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) })
|
2323
|
+
:romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) }),
|
2324
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
2124
2325
|
}.delete_if { |k, v| v.nil? }
|
2125
2326
|
r = @client.request("/#{CGI.escape(organization)}/order-estimates/#{CGI.escape(number)}").with_query(query).get
|
2126
2327
|
::Io::Flow::V0::Models::Experience.new(r)
|
@@ -2137,7 +2338,8 @@ module Io
|
|
2137
2338
|
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
|
2138
2339
|
:language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)),
|
2139
2340
|
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
2140
|
-
:romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) })
|
2341
|
+
:romanize => (x = opts.delete(:romanize); x.nil? ? nil : HttpClient::Preconditions.assert_class('romanize', x, Array).map { |v| HttpClient::Preconditions.assert_class('romanize', v, String) }),
|
2342
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
2141
2343
|
}.delete_if { |k, v| v.nil? }
|
2142
2344
|
(x = order_estimate_form; x.is_a?(::Io::Flow::V0::Models::OrderEstimateForm) ? x : ::Io::Flow::V0::Models::OrderEstimateForm.new(x))
|
2143
2345
|
r = @client.request("/#{CGI.escape(organization)}/order-estimates/#{CGI.escape(number)}").with_query(query).with_json(order_estimate_form.to_json).put
|
@@ -2236,6 +2438,12 @@ module Io
|
|
2236
2438
|
nil
|
2237
2439
|
end
|
2238
2440
|
|
2441
|
+
def get_generated_and_number(organization)
|
2442
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
2443
|
+
r = @client.request("/#{CGI.escape(organization)}/order/number/generators/generated/number").get
|
2444
|
+
::Io::Flow::V0::Models::OrderNumberGeneratorGeneratedNumber.new(r)
|
2445
|
+
end
|
2446
|
+
|
2239
2447
|
end
|
2240
2448
|
|
2241
2449
|
class OrderPromotions
|
@@ -2284,7 +2492,8 @@ module Io
|
|
2284
2492
|
query = {
|
2285
2493
|
:ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
|
2286
2494
|
:country => (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, String)),
|
2287
|
-
:status => HttpClient::Preconditions.assert_class('status', (x = opts.delete(:status); x.nil? ? [] : x), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ExperienceStatus) ? x : ::Io::Flow::V0::Models::ExperienceStatus.apply(x)).value }
|
2495
|
+
:status => HttpClient::Preconditions.assert_class('status', (x = opts.delete(:status); x.nil? ? [] : x), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ExperienceStatus) ? x : ::Io::Flow::V0::Models::ExperienceStatus.apply(x)).value },
|
2496
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
2288
2497
|
}.delete_if { |k, v| v.nil? }
|
2289
2498
|
r = @client.request("/#{CGI.escape(organization)}/countries").with_query(query).get
|
2290
2499
|
r.map { |x| ::Io::Flow::V0::Models::Country.new(x) }
|
@@ -2413,6 +2622,7 @@ module Io
|
|
2413
2622
|
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
|
2414
2623
|
:experience => (x = opts.delete(:experience); x.nil? ? nil : HttpClient::Preconditions.assert_class('experience', x, String)),
|
2415
2624
|
:ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
|
2625
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String)),
|
2416
2626
|
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
2417
2627
|
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
2418
2628
|
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "display_position" : x), String)
|
@@ -2430,6 +2640,7 @@ module Io
|
|
2430
2640
|
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
|
2431
2641
|
:experience => (x = opts.delete(:experience); x.nil? ? nil : HttpClient::Preconditions.assert_class('experience', x, String)),
|
2432
2642
|
:ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
|
2643
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String)),
|
2433
2644
|
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
2434
2645
|
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
2435
2646
|
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "display_position" : x), String)
|
@@ -2445,7 +2656,8 @@ module Io
|
|
2445
2656
|
query = {
|
2446
2657
|
:experiences => (x = opts.delete(:experiences); x.nil? ? nil : HttpClient::Preconditions.assert_class('experiences', x, Array).map { |v| HttpClient::Preconditions.assert_class('experiences', v, String) }),
|
2447
2658
|
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
2448
|
-
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer)
|
2659
|
+
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
2660
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
2449
2661
|
}.delete_if { |k, v| v.nil? }
|
2450
2662
|
r = @client.request("/#{CGI.escape(organization)}/payment/method/rules/batch").with_query(query).get
|
2451
2663
|
r.map { |x| ::Io::Flow::V0::Models::ExperiencePaymentMethodRule.new(x) }
|
@@ -4505,7 +4717,8 @@ module Io
|
|
4505
4717
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
4506
4718
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
4507
4719
|
query = {
|
4508
|
-
:show_commercial_invoice => (x = opts.delete(:show_commercial_invoice); x.nil? ? nil : HttpClient::Preconditions.assert_boolean('show_commercial_invoice', x))
|
4720
|
+
:show_commercial_invoice => (x = opts.delete(:show_commercial_invoice); x.nil? ? nil : HttpClient::Preconditions.assert_boolean('show_commercial_invoice', x)),
|
4721
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
4509
4722
|
}.delete_if { |k, v| v.nil? }
|
4510
4723
|
(x = shipping_label_form; x.is_a?(::Io::Flow::V0::Models::ShippingLabelForm) ? x : ::Io::Flow::V0::Models::ShippingLabelForm.from_json(x))
|
4511
4724
|
r = @client.request("/#{CGI.escape(organization)}/shipping_labels").with_query(query).with_json(shipping_label_form.to_json).post
|
@@ -5359,10 +5572,14 @@ module Io
|
|
5359
5572
|
nil
|
5360
5573
|
end
|
5361
5574
|
|
5362
|
-
def post_checkout_and_tokens_by_organization(organization, checkout_token_form)
|
5575
|
+
def post_checkout_and_tokens_by_organization(organization, checkout_token_form, incoming={})
|
5363
5576
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
5577
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
5578
|
+
query = {
|
5579
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
5580
|
+
}.delete_if { |k, v| v.nil? }
|
5364
5581
|
(x = checkout_token_form; x.is_a?(::Io::Flow::V0::Models::CheckoutTokenForm) ? x : ::Io::Flow::V0::Models::CheckoutTokenForm.from_json(x))
|
5365
|
-
r = @client.request("/#{CGI.escape(organization)}/checkout/tokens").with_json(checkout_token_form.to_json).post
|
5582
|
+
r = @client.request("/#{CGI.escape(organization)}/checkout/tokens").with_query(query).with_json(checkout_token_form.to_json).post
|
5366
5583
|
::Io::Flow::V0::Models::CheckoutToken.new(r)
|
5367
5584
|
end
|
5368
5585
|
|
@@ -6760,10 +6977,14 @@ module Io
|
|
6760
6977
|
::Io::Flow::V0::Models::Session.from_json(r)
|
6761
6978
|
end
|
6762
6979
|
|
6763
|
-
def post_organizations_by_organization(organization, session_form)
|
6980
|
+
def post_organizations_by_organization(organization, session_form, incoming={})
|
6764
6981
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
6982
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
6983
|
+
query = {
|
6984
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
6985
|
+
}.delete_if { |k, v| v.nil? }
|
6765
6986
|
(x = session_form; x.is_a?(::Io::Flow::V0::Models::SessionForm) ? x : ::Io::Flow::V0::Models::SessionForm.new(x))
|
6766
|
-
r = @client.request("/sessions/organizations/#{CGI.escape(organization)}").with_json(session_form.to_json).post
|
6987
|
+
r = @client.request("/sessions/organizations/#{CGI.escape(organization)}").with_query(query).with_json(session_form.to_json).post
|
6767
6988
|
::Io::Flow::V0::Models::OrganizationSession.new(r)
|
6768
6989
|
end
|
6769
6990
|
|
@@ -6773,10 +6994,14 @@ module Io
|
|
6773
6994
|
::Io::Flow::V0::Models::Session.from_json(r)
|
6774
6995
|
end
|
6775
6996
|
|
6776
|
-
def put_by_session(session, session_put_form)
|
6997
|
+
def put_by_session(session, session_put_form, incoming={})
|
6777
6998
|
HttpClient::Preconditions.assert_class('session', session, String)
|
6999
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
7000
|
+
query = {
|
7001
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
7002
|
+
}.delete_if { |k, v| v.nil? }
|
6778
7003
|
(x = session_put_form; x.is_a?(::Io::Flow::V0::Models::SessionPutForm) ? x : ::Io::Flow::V0::Models::SessionPutForm.new(x))
|
6779
|
-
r = @client.request("/sessions/#{CGI.escape(session)}").with_json(session_put_form.to_json).put
|
7004
|
+
r = @client.request("/sessions/#{CGI.escape(session)}").with_query(query).with_json(session_put_form.to_json).put
|
6780
7005
|
::Io::Flow::V0::Models::Session.from_json(r)
|
6781
7006
|
end
|
6782
7007
|
|
@@ -6793,19 +7018,27 @@ module Io
|
|
6793
7018
|
::Io::Flow::V0::Models::Session.from_json(r)
|
6794
7019
|
end
|
6795
7020
|
|
6796
|
-
def put_organizations_by_session_and_organization(session, organization, session_put_form)
|
7021
|
+
def put_organizations_by_session_and_organization(session, organization, session_put_form, incoming={})
|
6797
7022
|
HttpClient::Preconditions.assert_class('session', session, String)
|
6798
7023
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
7024
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
7025
|
+
query = {
|
7026
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
7027
|
+
}.delete_if { |k, v| v.nil? }
|
6799
7028
|
(x = session_put_form; x.is_a?(::Io::Flow::V0::Models::SessionPutForm) ? x : ::Io::Flow::V0::Models::SessionPutForm.new(x))
|
6800
|
-
r = @client.request("/sessions/#{CGI.escape(session)}/organizations/#{CGI.escape(organization)}").with_json(session_put_form.to_json).put
|
7029
|
+
r = @client.request("/sessions/#{CGI.escape(session)}/organizations/#{CGI.escape(organization)}").with_query(query).with_json(session_put_form.to_json).put
|
6801
7030
|
::Io::Flow::V0::Models::OrganizationSession.new(r)
|
6802
7031
|
end
|
6803
7032
|
|
6804
7033
|
# Resets the session based on the provided geo parameters.
|
6805
|
-
def put_reset_by_session(session, session_put_form)
|
7034
|
+
def put_reset_by_session(session, session_put_form, incoming={})
|
6806
7035
|
HttpClient::Preconditions.assert_class('session', session, String)
|
7036
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
7037
|
+
query = {
|
7038
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
7039
|
+
}.delete_if { |k, v| v.nil? }
|
6807
7040
|
(x = session_put_form; x.is_a?(::Io::Flow::V0::Models::SessionPutForm) ? x : ::Io::Flow::V0::Models::SessionPutForm.new(x))
|
6808
|
-
r = @client.request("/sessions/#{CGI.escape(session)}/reset").with_json(session_put_form.to_json).put
|
7041
|
+
r = @client.request("/sessions/#{CGI.escape(session)}/reset").with_query(query).with_json(session_put_form.to_json).put
|
6809
7042
|
::Io::Flow::V0::Models::Session.from_json(r)
|
6810
7043
|
end
|
6811
7044
|
|
@@ -6832,47 +7065,71 @@ module Io
|
|
6832
7065
|
end
|
6833
7066
|
|
6834
7067
|
# Retrieve representation of a Shopify cart for the given order number.
|
6835
|
-
def get_order_by_number(number)
|
7068
|
+
def get_order_by_number(number, incoming={})
|
6836
7069
|
HttpClient::Preconditions.assert_class('number', number, String)
|
6837
|
-
|
7070
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
7071
|
+
query = {
|
7072
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
7073
|
+
}.delete_if { |k, v| v.nil? }
|
7074
|
+
r = @client.request("/shopify/carts/order/#{CGI.escape(number)}").with_query(query).get
|
6838
7075
|
::Io::Flow::V0::Models::ShopifyCart.new(r)
|
6839
7076
|
end
|
6840
7077
|
|
6841
7078
|
# Retrieve representation of a Shopify cart given the unique cart id.
|
6842
|
-
def get_by_id_html(id)
|
7079
|
+
def get_by_id_html(id, incoming={})
|
6843
7080
|
HttpClient::Preconditions.assert_class('id', id, String)
|
6844
|
-
|
7081
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
7082
|
+
query = {
|
7083
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
7084
|
+
}.delete_if { |k, v| v.nil? }
|
7085
|
+
r = @client.request("/shopify/carts/#{CGI.escape(id)}").with_query(query).get
|
6845
7086
|
r
|
6846
7087
|
end
|
6847
7088
|
|
6848
7089
|
# Retrieve representation of a Shopify cart given the unique cart id.
|
6849
|
-
def get_by_id(id)
|
7090
|
+
def get_by_id(id, incoming={})
|
6850
7091
|
HttpClient::Preconditions.assert_class('id', id, String)
|
6851
|
-
|
7092
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
7093
|
+
query = {
|
7094
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
7095
|
+
}.delete_if { |k, v| v.nil? }
|
7096
|
+
r = @client.request("/shopify/carts/#{CGI.escape(id)}").with_query(query).get
|
6852
7097
|
::Io::Flow::V0::Models::ShopifyCart.new(r)
|
6853
7098
|
end
|
6854
7099
|
|
6855
7100
|
# Add an item to a Shopify cart given the unique cart id.
|
6856
|
-
def post_add_by_id(id, shopify_cart_add_form)
|
7101
|
+
def post_add_by_id(id, shopify_cart_add_form, incoming={})
|
6857
7102
|
HttpClient::Preconditions.assert_class('id', id, String)
|
7103
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
7104
|
+
query = {
|
7105
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
7106
|
+
}.delete_if { |k, v| v.nil? }
|
6858
7107
|
(x = shopify_cart_add_form; x.is_a?(::Io::Flow::V0::Models::ShopifyCartAddForm) ? x : ::Io::Flow::V0::Models::ShopifyCartAddForm.from_json(x))
|
6859
|
-
r = @client.request("/shopify/carts/#{CGI.escape(id)}/add").with_json(shopify_cart_add_form.to_json).post
|
7108
|
+
r = @client.request("/shopify/carts/#{CGI.escape(id)}/add").with_query(query).with_json(shopify_cart_add_form.to_json).post
|
6860
7109
|
::Io::Flow::V0::Models::ShopifyCart.new(r)
|
6861
7110
|
end
|
6862
7111
|
|
6863
7112
|
# Update the attribute information for the cart.
|
6864
|
-
def put_attributes_by_id(id, shopify_order_attributes_form)
|
7113
|
+
def put_attributes_by_id(id, shopify_order_attributes_form, incoming={})
|
6865
7114
|
HttpClient::Preconditions.assert_class('id', id, String)
|
7115
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
7116
|
+
query = {
|
7117
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
7118
|
+
}.delete_if { |k, v| v.nil? }
|
6866
7119
|
(x = shopify_order_attributes_form; x.is_a?(::Io::Flow::V0::Models::ShopifyOrderAttributesForm) ? x : ::Io::Flow::V0::Models::ShopifyOrderAttributesForm.new(x))
|
6867
|
-
r = @client.request("/shopify/carts/#{CGI.escape(id)}/attributes").with_json(shopify_order_attributes_form.to_json).put
|
7120
|
+
r = @client.request("/shopify/carts/#{CGI.escape(id)}/attributes").with_query(query).with_json(shopify_order_attributes_form.to_json).put
|
6868
7121
|
::Io::Flow::V0::Models::ShopifyCart.new(r)
|
6869
7122
|
end
|
6870
7123
|
|
6871
7124
|
# Change/Update an item in a Shopify cart given the unique cart id.
|
6872
|
-
def post_change_by_id(id, shopify_cart_change_form)
|
7125
|
+
def post_change_by_id(id, shopify_cart_change_form, incoming={})
|
6873
7126
|
HttpClient::Preconditions.assert_class('id', id, String)
|
7127
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
7128
|
+
query = {
|
7129
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
7130
|
+
}.delete_if { |k, v| v.nil? }
|
6874
7131
|
(x = shopify_cart_change_form; x.is_a?(::Io::Flow::V0::Models::ShopifyCartChangeForm) ? x : ::Io::Flow::V0::Models::ShopifyCartChangeForm.new(x))
|
6875
|
-
r = @client.request("/shopify/carts/#{CGI.escape(id)}/change").with_json(shopify_cart_change_form.to_json).post
|
7132
|
+
r = @client.request("/shopify/carts/#{CGI.escape(id)}/change").with_query(query).with_json(shopify_cart_change_form.to_json).post
|
6876
7133
|
::Io::Flow::V0::Models::ShopifyCart.new(r)
|
6877
7134
|
end
|
6878
7135
|
|
@@ -6884,10 +7141,14 @@ module Io
|
|
6884
7141
|
end
|
6885
7142
|
|
6886
7143
|
# Update the geo information for the cart.
|
6887
|
-
def put_geo_by_id(id, geo_form)
|
7144
|
+
def put_geo_by_id(id, geo_form, incoming={})
|
6888
7145
|
HttpClient::Preconditions.assert_class('id', id, String)
|
7146
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
7147
|
+
query = {
|
7148
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
7149
|
+
}.delete_if { |k, v| v.nil? }
|
6889
7150
|
(x = geo_form; x.is_a?(::Io::Flow::V0::Models::GeoForm) ? x : ::Io::Flow::V0::Models::GeoForm.new(x))
|
6890
|
-
r = @client.request("/shopify/carts/#{CGI.escape(id)}/geo").with_json(geo_form.to_json).put
|
7151
|
+
r = @client.request("/shopify/carts/#{CGI.escape(id)}/geo").with_query(query).with_json(geo_form.to_json).put
|
6891
7152
|
::Io::Flow::V0::Models::ShopifyCart.new(r)
|
6892
7153
|
end
|
6893
7154
|
|
@@ -6896,7 +7157,8 @@ module Io
|
|
6896
7157
|
HttpClient::Preconditions.assert_class('id', id, String)
|
6897
7158
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
6898
7159
|
query = {
|
6899
|
-
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
|
7160
|
+
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
7161
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
6900
7162
|
}.delete_if { |k, v| v.nil? }
|
6901
7163
|
r = @client.request("/shopify/carts/#{CGI.escape(id)}/orders").with_query(query).post
|
6902
7164
|
::Io::Flow::V0::Models::Order.new(r)
|
@@ -6916,7 +7178,8 @@ module Io
|
|
6916
7178
|
HttpClient::Preconditions.assert_class('experience_key', experience_key, String)
|
6917
7179
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
6918
7180
|
query = {
|
6919
|
-
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
|
7181
|
+
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) }),
|
7182
|
+
:context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
|
6920
7183
|
}.delete_if { |k, v| v.nil? }
|
6921
7184
|
(x = io_flow_shopify_external_v0_models_shopify_external_cart; x.is_a?(::Io::Flow::Shopify::External::V0::Models::ShopifyExternalCart) ? x : ::Io::Flow::Shopify::External::V0::Models::ShopifyExternalCart.new(x))
|
6922
7185
|
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(experience_key)}/shopify/cart/conversions").with_query(query).with_json(io_flow_shopify_external_v0_models_shopify_external_cart.to_json).post
|
@@ -7502,6 +7765,68 @@ module Io
|
|
7502
7765
|
|
7503
7766
|
module Models
|
7504
7767
|
|
7768
|
+
# Configurations to support payment authentication done in the user experience
|
7769
|
+
# e.g. card authentication with 3DS by an issuer ACS.
|
7770
|
+
class ActionConfiguration
|
7771
|
+
|
7772
|
+
module Types
|
7773
|
+
THREEDS_TWO_BROWSER_ACTION_CONFIGURATION = 'threeds_two_browser_action_configuration' unless defined?(THREEDS_TWO_BROWSER_ACTION_CONFIGURATION)
|
7774
|
+
end
|
7775
|
+
|
7776
|
+
attr_reader :discriminator
|
7777
|
+
|
7778
|
+
def initialize(incoming={})
|
7779
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
7780
|
+
HttpClient::Preconditions.require_keys(opts, [:discriminator], 'ActionConfiguration')
|
7781
|
+
@discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator), String)
|
7782
|
+
end
|
7783
|
+
|
7784
|
+
def subtype_to_hash
|
7785
|
+
raise 'Cannot serialize an instance of action_configuration directly - must use one of the specific types: threeds_two_browser_action_configuration'
|
7786
|
+
end
|
7787
|
+
|
7788
|
+
def to_hash
|
7789
|
+
subtype_to_hash.merge(:discriminator => @discriminator)
|
7790
|
+
end
|
7791
|
+
|
7792
|
+
def ActionConfiguration.from_json(hash)
|
7793
|
+
HttpClient::Preconditions.assert_class('hash', hash, Hash)
|
7794
|
+
discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
|
7795
|
+
if discriminator.empty?
|
7796
|
+
raise "Union type[action_configuration] requires a field named 'discriminator'"
|
7797
|
+
end
|
7798
|
+
case discriminator
|
7799
|
+
when Types::THREEDS_TWO_BROWSER_ACTION_CONFIGURATION; ThreedsTwoBrowserActionConfiguration.new(hash)
|
7800
|
+
else ActionConfigurationUndefinedType.new(:discriminator => discriminator)
|
7801
|
+
end
|
7802
|
+
end
|
7803
|
+
|
7804
|
+
end
|
7805
|
+
|
7806
|
+
class ActionConfigurationUndefinedType < ActionConfiguration
|
7807
|
+
|
7808
|
+
attr_reader :name
|
7809
|
+
|
7810
|
+
def initialize(incoming={})
|
7811
|
+
super(:discriminator => 'undefined_type')
|
7812
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
7813
|
+
@name = HttpClient::Preconditions.assert_class('name', opts.delete(:discriminator), String)
|
7814
|
+
end
|
7815
|
+
|
7816
|
+
def subtype_to_hash
|
7817
|
+
raise 'Unable to serialize undefined type to json'
|
7818
|
+
end
|
7819
|
+
|
7820
|
+
def copy(incoming={})
|
7821
|
+
raise 'Operation not supported for undefined type'
|
7822
|
+
end
|
7823
|
+
|
7824
|
+
def to_hash
|
7825
|
+
raise 'Operation not supported for undefined type'
|
7826
|
+
end
|
7827
|
+
|
7828
|
+
end
|
7829
|
+
|
7505
7830
|
class AdyenNativeData
|
7506
7831
|
|
7507
7832
|
module Types
|
@@ -7971,6 +8296,8 @@ module Io
|
|
7971
8296
|
module Types
|
7972
8297
|
ADYEN_NATIVE_ACTION_DETAILS = 'adyen_native_action_details' unless defined?(ADYEN_NATIVE_ACTION_DETAILS)
|
7973
8298
|
STRIPE_AUTHORIZATION_RESULT_ACTION_DETAILS = 'stripe_authorization_result_action_details' unless defined?(STRIPE_AUTHORIZATION_RESULT_ACTION_DETAILS)
|
8299
|
+
THREEDS_IDENTIFY_ACTION_DETAILS = 'threeds_identify_action_details' unless defined?(THREEDS_IDENTIFY_ACTION_DETAILS)
|
8300
|
+
THREEDS_CHALLENGE_ACTION_DETAILS = 'threeds_challenge_action_details' unless defined?(THREEDS_CHALLENGE_ACTION_DETAILS)
|
7974
8301
|
end
|
7975
8302
|
|
7976
8303
|
attr_reader :discriminator
|
@@ -7982,7 +8309,7 @@ module Io
|
|
7982
8309
|
end
|
7983
8310
|
|
7984
8311
|
def subtype_to_hash
|
7985
|
-
raise 'Cannot serialize an instance of authorization_result_action_details directly - must use one of the specific types: adyen_native_action_details, stripe_authorization_result_action_details'
|
8312
|
+
raise 'Cannot serialize an instance of authorization_result_action_details directly - must use one of the specific types: adyen_native_action_details, stripe_authorization_result_action_details, threeds_identify_action_details, threeds_challenge_action_details'
|
7986
8313
|
end
|
7987
8314
|
|
7988
8315
|
def to_hash
|
@@ -7998,6 +8325,8 @@ module Io
|
|
7998
8325
|
case discriminator
|
7999
8326
|
when Types::ADYEN_NATIVE_ACTION_DETAILS; AdyenNativeActionDetails.new(hash)
|
8000
8327
|
when Types::STRIPE_AUTHORIZATION_RESULT_ACTION_DETAILS; StripeAuthorizationResultActionDetails.new(hash)
|
8328
|
+
when Types::THREEDS_IDENTIFY_ACTION_DETAILS; ThreedsIdentifyActionDetails.new(hash)
|
8329
|
+
when Types::THREEDS_CHALLENGE_ACTION_DETAILS; ThreedsChallengeActionDetails.new(hash)
|
8001
8330
|
else AuthorizationResultActionDetailsUndefinedType.new(:discriminator => discriminator)
|
8002
8331
|
end
|
8003
8332
|
end
|
@@ -11829,6 +12158,130 @@ module Io
|
|
11829
12158
|
|
11830
12159
|
end
|
11831
12160
|
|
12161
|
+
# Different version sets of 3ds challenge actions.
|
12162
|
+
class ThreedsChallengeAction
|
12163
|
+
|
12164
|
+
module Types
|
12165
|
+
# Used for 2.1 and 2.2 versions of 3ds
|
12166
|
+
THREEDS_TWO_CHALLENGE_REQUEST = 'threeds_two_challenge_request' unless defined?(THREEDS_TWO_CHALLENGE_REQUEST)
|
12167
|
+
end
|
12168
|
+
|
12169
|
+
attr_reader :discriminator
|
12170
|
+
|
12171
|
+
def initialize(incoming={})
|
12172
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
12173
|
+
HttpClient::Preconditions.require_keys(opts, [:discriminator], 'ThreedsChallengeAction')
|
12174
|
+
@discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator), String)
|
12175
|
+
end
|
12176
|
+
|
12177
|
+
def subtype_to_hash
|
12178
|
+
raise 'Cannot serialize an instance of threeds_challenge_action directly - must use one of the specific types: threeds_two_challenge_request'
|
12179
|
+
end
|
12180
|
+
|
12181
|
+
def to_hash
|
12182
|
+
subtype_to_hash.merge(:discriminator => @discriminator)
|
12183
|
+
end
|
12184
|
+
|
12185
|
+
def ThreedsChallengeAction.from_json(hash)
|
12186
|
+
HttpClient::Preconditions.assert_class('hash', hash, Hash)
|
12187
|
+
discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
|
12188
|
+
if discriminator.empty?
|
12189
|
+
raise "Union type[threeds_challenge_action] requires a field named 'discriminator'"
|
12190
|
+
end
|
12191
|
+
case discriminator
|
12192
|
+
when Types::THREEDS_TWO_CHALLENGE_REQUEST; ThreedsTwoChallengeRequest.new(hash)
|
12193
|
+
else ThreedsChallengeActionUndefinedType.new(:discriminator => discriminator)
|
12194
|
+
end
|
12195
|
+
end
|
12196
|
+
|
12197
|
+
end
|
12198
|
+
|
12199
|
+
class ThreedsChallengeActionUndefinedType < ThreedsChallengeAction
|
12200
|
+
|
12201
|
+
attr_reader :name
|
12202
|
+
|
12203
|
+
def initialize(incoming={})
|
12204
|
+
super(:discriminator => 'undefined_type')
|
12205
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
12206
|
+
@name = HttpClient::Preconditions.assert_class('name', opts.delete(:discriminator), String)
|
12207
|
+
end
|
12208
|
+
|
12209
|
+
def subtype_to_hash
|
12210
|
+
raise 'Unable to serialize undefined type to json'
|
12211
|
+
end
|
12212
|
+
|
12213
|
+
def copy(incoming={})
|
12214
|
+
raise 'Operation not supported for undefined type'
|
12215
|
+
end
|
12216
|
+
|
12217
|
+
def to_hash
|
12218
|
+
raise 'Operation not supported for undefined type'
|
12219
|
+
end
|
12220
|
+
|
12221
|
+
end
|
12222
|
+
|
12223
|
+
# Different version sets of 3ds identify actions.
|
12224
|
+
class ThreedsIdentifyAction
|
12225
|
+
|
12226
|
+
module Types
|
12227
|
+
# Used for 2.1 and 2.2 versions of 3ds
|
12228
|
+
THREEDS_TWO_METHOD = 'threeds_two_method' unless defined?(THREEDS_TWO_METHOD)
|
12229
|
+
end
|
12230
|
+
|
12231
|
+
attr_reader :discriminator
|
12232
|
+
|
12233
|
+
def initialize(incoming={})
|
12234
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
12235
|
+
HttpClient::Preconditions.require_keys(opts, [:discriminator], 'ThreedsIdentifyAction')
|
12236
|
+
@discriminator = HttpClient::Preconditions.assert_class('discriminator', opts.delete(:discriminator), String)
|
12237
|
+
end
|
12238
|
+
|
12239
|
+
def subtype_to_hash
|
12240
|
+
raise 'Cannot serialize an instance of threeds_identify_action directly - must use one of the specific types: threeds_two_method'
|
12241
|
+
end
|
12242
|
+
|
12243
|
+
def to_hash
|
12244
|
+
subtype_to_hash.merge(:discriminator => @discriminator)
|
12245
|
+
end
|
12246
|
+
|
12247
|
+
def ThreedsIdentifyAction.from_json(hash)
|
12248
|
+
HttpClient::Preconditions.assert_class('hash', hash, Hash)
|
12249
|
+
discriminator = HttpClient::Helper.symbolize_keys(hash)[:discriminator].to_s.strip
|
12250
|
+
if discriminator.empty?
|
12251
|
+
raise "Union type[threeds_identify_action] requires a field named 'discriminator'"
|
12252
|
+
end
|
12253
|
+
case discriminator
|
12254
|
+
when Types::THREEDS_TWO_METHOD; ThreedsTwoMethod.new(hash)
|
12255
|
+
else ThreedsIdentifyActionUndefinedType.new(:discriminator => discriminator)
|
12256
|
+
end
|
12257
|
+
end
|
12258
|
+
|
12259
|
+
end
|
12260
|
+
|
12261
|
+
class ThreedsIdentifyActionUndefinedType < ThreedsIdentifyAction
|
12262
|
+
|
12263
|
+
attr_reader :name
|
12264
|
+
|
12265
|
+
def initialize(incoming={})
|
12266
|
+
super(:discriminator => 'undefined_type')
|
12267
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
12268
|
+
@name = HttpClient::Preconditions.assert_class('name', opts.delete(:discriminator), String)
|
12269
|
+
end
|
12270
|
+
|
12271
|
+
def subtype_to_hash
|
12272
|
+
raise 'Unable to serialize undefined type to json'
|
12273
|
+
end
|
12274
|
+
|
12275
|
+
def copy(incoming={})
|
12276
|
+
raise 'Operation not supported for undefined type'
|
12277
|
+
end
|
12278
|
+
|
12279
|
+
def to_hash
|
12280
|
+
raise 'Operation not supported for undefined type'
|
12281
|
+
end
|
12282
|
+
|
12283
|
+
end
|
12284
|
+
|
11832
12285
|
# Possible outcome types from a tier rule
|
11833
12286
|
class TierRuleOutcome
|
11834
12287
|
|
@@ -12372,7 +12825,7 @@ module Io
|
|
12372
12825
|
end
|
12373
12826
|
|
12374
12827
|
def AttributeIntent.ALL
|
12375
|
-
@@all ||= [AttributeIntent.brand, AttributeIntent.color, AttributeIntent.countries_of_origin, AttributeIntent.product_id, AttributeIntent.fulfillment_method, AttributeIntent.hazardous, AttributeIntent.price, AttributeIntent.size, AttributeIntent.sku, AttributeIntent.taxability, AttributeIntent.consumer_url, AttributeIntent.gtin, AttributeIntent.mpn, AttributeIntent.facet, AttributeIntent.eccn]
|
12828
|
+
@@all ||= [AttributeIntent.brand, AttributeIntent.color, AttributeIntent.countries_of_origin, AttributeIntent.product_id, AttributeIntent.fulfillment_method, AttributeIntent.hazardous, AttributeIntent.price, AttributeIntent.size, AttributeIntent.sku, AttributeIntent.taxability, AttributeIntent.consumer_url, AttributeIntent.gtin, AttributeIntent.mpn, AttributeIntent.facet, AttributeIntent.eccn, AttributeIntent.returnable, AttributeIntent.searchable]
|
12376
12829
|
end
|
12377
12830
|
|
12378
12831
|
# A brand name of the item (for retailers that sell multiple brands)
|
@@ -12458,6 +12911,17 @@ module Io
|
|
12458
12911
|
@@_eccn ||= AttributeIntent.new('eccn')
|
12459
12912
|
end
|
12460
12913
|
|
12914
|
+
# Identifies whether the item can be returned. If not present on an item, it is
|
12915
|
+
# assumed to be returnable.
|
12916
|
+
def AttributeIntent.returnable
|
12917
|
+
@@_returnable ||= AttributeIntent.new('returnable')
|
12918
|
+
end
|
12919
|
+
|
12920
|
+
# Identifies whether the attribute can be used to search for an item.
|
12921
|
+
def AttributeIntent.searchable
|
12922
|
+
@@_searchable ||= AttributeIntent.new('searchable')
|
12923
|
+
end
|
12924
|
+
|
12461
12925
|
def to_hash
|
12462
12926
|
value
|
12463
12927
|
end
|
@@ -15587,6 +16051,55 @@ module Io
|
|
15587
16051
|
|
15588
16052
|
end
|
15589
16053
|
|
16054
|
+
class FlowEntity
|
16055
|
+
|
16056
|
+
attr_reader :value
|
16057
|
+
|
16058
|
+
def initialize(value)
|
16059
|
+
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
16060
|
+
end
|
16061
|
+
|
16062
|
+
# Returns the instance of FlowEntity for this value, creating a new instance for an unknown value
|
16063
|
+
def FlowEntity.apply(value)
|
16064
|
+
if value.instance_of?(FlowEntity)
|
16065
|
+
value
|
16066
|
+
else
|
16067
|
+
HttpClient::Preconditions.assert_class_or_nil('value', value, String)
|
16068
|
+
value.nil? ? nil : (from_string(value) || FlowEntity.new(value))
|
16069
|
+
end
|
16070
|
+
end
|
16071
|
+
|
16072
|
+
# Returns the instance of FlowEntity for this value, or nil if not found
|
16073
|
+
def FlowEntity.from_string(value)
|
16074
|
+
HttpClient::Preconditions.assert_class('value', value, String)
|
16075
|
+
FlowEntity.ALL.find { |v| v.value == value }
|
16076
|
+
end
|
16077
|
+
|
16078
|
+
def FlowEntity.ALL
|
16079
|
+
@@all ||= [FlowEntity.flow_usa, FlowEntity.flow_irl, FlowEntity.flow_can]
|
16080
|
+
end
|
16081
|
+
|
16082
|
+
# Flow Commerce Inc., Hoboken, NJ, USA
|
16083
|
+
def FlowEntity.flow_usa
|
16084
|
+
@@_flow_usa ||= FlowEntity.new('flow-usa')
|
16085
|
+
end
|
16086
|
+
|
16087
|
+
# Flow Commerce Ltd., Dublin, IRL
|
16088
|
+
def FlowEntity.flow_irl
|
16089
|
+
@@_flow_irl ||= FlowEntity.new('flow-irl')
|
16090
|
+
end
|
16091
|
+
|
16092
|
+
# Flow Commerce Canada Inc., Vancouver, BC, CAN
|
16093
|
+
def FlowEntity.flow_can
|
16094
|
+
@@_flow_can ||= FlowEntity.new('flow-can')
|
16095
|
+
end
|
16096
|
+
|
16097
|
+
def to_hash
|
16098
|
+
value
|
16099
|
+
end
|
16100
|
+
|
16101
|
+
end
|
16102
|
+
|
15590
16103
|
class FlowRole
|
15591
16104
|
|
15592
16105
|
attr_reader :value
|
@@ -16603,6 +17116,48 @@ module Io
|
|
16603
17116
|
|
16604
17117
|
end
|
16605
17118
|
|
17119
|
+
class ItemIdentifier
|
17120
|
+
|
17121
|
+
attr_reader :value
|
17122
|
+
|
17123
|
+
def initialize(value)
|
17124
|
+
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
17125
|
+
end
|
17126
|
+
|
17127
|
+
# Returns the instance of ItemIdentifier for this value, creating a new instance for an unknown value
|
17128
|
+
def ItemIdentifier.apply(value)
|
17129
|
+
if value.instance_of?(ItemIdentifier)
|
17130
|
+
value
|
17131
|
+
else
|
17132
|
+
HttpClient::Preconditions.assert_class_or_nil('value', value, String)
|
17133
|
+
value.nil? ? nil : (from_string(value) || ItemIdentifier.new(value))
|
17134
|
+
end
|
17135
|
+
end
|
17136
|
+
|
17137
|
+
# Returns the instance of ItemIdentifier for this value, or nil if not found
|
17138
|
+
def ItemIdentifier.from_string(value)
|
17139
|
+
HttpClient::Preconditions.assert_class('value', value, String)
|
17140
|
+
ItemIdentifier.ALL.find { |v| v.value == value }
|
17141
|
+
end
|
17142
|
+
|
17143
|
+
def ItemIdentifier.ALL
|
17144
|
+
@@all ||= [ItemIdentifier.item_number, ItemIdentifier.sku]
|
17145
|
+
end
|
17146
|
+
|
17147
|
+
def ItemIdentifier.item_number
|
17148
|
+
@@_item_number ||= ItemIdentifier.new('item_number')
|
17149
|
+
end
|
17150
|
+
|
17151
|
+
def ItemIdentifier.sku
|
17152
|
+
@@_sku ||= ItemIdentifier.new('sku')
|
17153
|
+
end
|
17154
|
+
|
17155
|
+
def to_hash
|
17156
|
+
value
|
17157
|
+
end
|
17158
|
+
|
17159
|
+
end
|
17160
|
+
|
16606
17161
|
class LaneDirection
|
16607
17162
|
|
16608
17163
|
attr_reader :value
|
@@ -17837,6 +18392,55 @@ module Io
|
|
17837
18392
|
|
17838
18393
|
end
|
17839
18394
|
|
18395
|
+
class OrganizationStatus
|
18396
|
+
|
18397
|
+
attr_reader :value
|
18398
|
+
|
18399
|
+
def initialize(value)
|
18400
|
+
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
18401
|
+
end
|
18402
|
+
|
18403
|
+
# Returns the instance of OrganizationStatus for this value, creating a new instance for an unknown value
|
18404
|
+
def OrganizationStatus.apply(value)
|
18405
|
+
if value.instance_of?(OrganizationStatus)
|
18406
|
+
value
|
18407
|
+
else
|
18408
|
+
HttpClient::Preconditions.assert_class_or_nil('value', value, String)
|
18409
|
+
value.nil? ? nil : (from_string(value) || OrganizationStatus.new(value))
|
18410
|
+
end
|
18411
|
+
end
|
18412
|
+
|
18413
|
+
# Returns the instance of OrganizationStatus for this value, or nil if not found
|
18414
|
+
def OrganizationStatus.from_string(value)
|
18415
|
+
HttpClient::Preconditions.assert_class('value', value, String)
|
18416
|
+
OrganizationStatus.ALL.find { |v| v.value == value }
|
18417
|
+
end
|
18418
|
+
|
18419
|
+
def OrganizationStatus.ALL
|
18420
|
+
@@all ||= [OrganizationStatus.active, OrganizationStatus.inactive, OrganizationStatus.deactivated]
|
18421
|
+
end
|
18422
|
+
|
18423
|
+
def OrganizationStatus.active
|
18424
|
+
@@_active ||= OrganizationStatus.new('active')
|
18425
|
+
end
|
18426
|
+
|
18427
|
+
# Determined by usage: ex: orders placed, experience updated, catalog items
|
18428
|
+
# updated, etc...
|
18429
|
+
def OrganizationStatus.inactive
|
18430
|
+
@@_inactive ||= OrganizationStatus.new('inactive')
|
18431
|
+
end
|
18432
|
+
|
18433
|
+
# Manually deactivated
|
18434
|
+
def OrganizationStatus.deactivated
|
18435
|
+
@@_deactivated ||= OrganizationStatus.new('deactivated')
|
18436
|
+
end
|
18437
|
+
|
18438
|
+
def to_hash
|
18439
|
+
value
|
18440
|
+
end
|
18441
|
+
|
18442
|
+
end
|
18443
|
+
|
17840
18444
|
class PaymentErrorCode
|
17841
18445
|
|
17842
18446
|
attr_reader :value
|
@@ -20147,6 +20751,65 @@ module Io
|
|
20147
20751
|
|
20148
20752
|
end
|
20149
20753
|
|
20754
|
+
class ThreedsTwoChallengeViewport
|
20755
|
+
|
20756
|
+
attr_reader :value
|
20757
|
+
|
20758
|
+
def initialize(value)
|
20759
|
+
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
20760
|
+
end
|
20761
|
+
|
20762
|
+
# Returns the instance of ThreedsTwoChallengeViewport for this value, creating a new instance for an unknown value
|
20763
|
+
def ThreedsTwoChallengeViewport.apply(value)
|
20764
|
+
if value.instance_of?(ThreedsTwoChallengeViewport)
|
20765
|
+
value
|
20766
|
+
else
|
20767
|
+
HttpClient::Preconditions.assert_class_or_nil('value', value, String)
|
20768
|
+
value.nil? ? nil : (from_string(value) || ThreedsTwoChallengeViewport.new(value))
|
20769
|
+
end
|
20770
|
+
end
|
20771
|
+
|
20772
|
+
# Returns the instance of ThreedsTwoChallengeViewport for this value, or nil if not found
|
20773
|
+
def ThreedsTwoChallengeViewport.from_string(value)
|
20774
|
+
HttpClient::Preconditions.assert_class('value', value, String)
|
20775
|
+
ThreedsTwoChallengeViewport.ALL.find { |v| v.value == value }
|
20776
|
+
end
|
20777
|
+
|
20778
|
+
def ThreedsTwoChallengeViewport.ALL
|
20779
|
+
@@all ||= [ThreedsTwoChallengeViewport.xxx_small, ThreedsTwoChallengeViewport.xx_small, ThreedsTwoChallengeViewport.x_small, ThreedsTwoChallengeViewport.small, ThreedsTwoChallengeViewport.fullscreen]
|
20780
|
+
end
|
20781
|
+
|
20782
|
+
# 250x400
|
20783
|
+
def ThreedsTwoChallengeViewport.xxx_small
|
20784
|
+
@@_xxx_small ||= ThreedsTwoChallengeViewport.new('xxx_small')
|
20785
|
+
end
|
20786
|
+
|
20787
|
+
# 390x400
|
20788
|
+
def ThreedsTwoChallengeViewport.xx_small
|
20789
|
+
@@_xx_small ||= ThreedsTwoChallengeViewport.new('xx_small')
|
20790
|
+
end
|
20791
|
+
|
20792
|
+
# 500x600
|
20793
|
+
def ThreedsTwoChallengeViewport.x_small
|
20794
|
+
@@_x_small ||= ThreedsTwoChallengeViewport.new('x_small')
|
20795
|
+
end
|
20796
|
+
|
20797
|
+
# 600x400
|
20798
|
+
def ThreedsTwoChallengeViewport.small
|
20799
|
+
@@_small ||= ThreedsTwoChallengeViewport.new('small')
|
20800
|
+
end
|
20801
|
+
|
20802
|
+
# Full Screen. Not recommended for mobile devices at this time.
|
20803
|
+
def ThreedsTwoChallengeViewport.fullscreen
|
20804
|
+
@@_fullscreen ||= ThreedsTwoChallengeViewport.new('fullscreen')
|
20805
|
+
end
|
20806
|
+
|
20807
|
+
def to_hash
|
20808
|
+
value
|
20809
|
+
end
|
20810
|
+
|
20811
|
+
end
|
20812
|
+
|
20150
20813
|
class TierAvailability
|
20151
20814
|
|
20152
20815
|
attr_reader :value
|
@@ -21692,12 +22355,13 @@ module Io
|
|
21692
22355
|
|
21693
22356
|
class AllocationLineDetail < AllocationDetail
|
21694
22357
|
|
21695
|
-
attr_reader :number, :quantity, :key, :price, :total, :included, :not_included
|
22358
|
+
attr_reader :id, :number, :quantity, :key, :price, :total, :included, :not_included
|
21696
22359
|
|
21697
22360
|
def initialize(incoming={})
|
21698
22361
|
super(:discriminator => AllocationDetail::Types::ALLOCATION_LINE_DETAIL)
|
21699
22362
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
21700
22363
|
HttpClient::Preconditions.require_keys(opts, [:number, :quantity, :key, :price, :total, :included, :not_included], 'AllocationLineDetail')
|
22364
|
+
@id = (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, String))
|
21701
22365
|
@number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
|
21702
22366
|
@quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
|
21703
22367
|
@key = (x = opts.delete(:key); x.is_a?(::Io::Flow::V0::Models::OrderPriceDetailKey) ? x : ::Io::Flow::V0::Models::OrderPriceDetailKey.apply(x))
|
@@ -21717,6 +22381,7 @@ module Io
|
|
21717
22381
|
|
21718
22382
|
def subtype_to_hash
|
21719
22383
|
{
|
22384
|
+
:id => id,
|
21720
22385
|
:number => number,
|
21721
22386
|
:quantity => quantity,
|
21722
22387
|
:key => key.value,
|
@@ -23517,7 +24182,8 @@ module Io
|
|
23517
24182
|
|
23518
24183
|
end
|
23519
24184
|
|
23520
|
-
# Shopper browser info
|
24185
|
+
# Shopper browser info used as part of card authentication. All of these fields
|
24186
|
+
# are required if you are using 3DS2.
|
23521
24187
|
class BrowserInfo
|
23522
24188
|
|
23523
24189
|
attr_reader :origin, :language, :java_enabled, :color_depth, :screen_height, :screen_width, :time_zone_offset, :user_agent, :accept
|
@@ -24321,7 +24987,7 @@ module Io
|
|
24321
24987
|
# Creates an authorization for a transaction from a card payment source.
|
24322
24988
|
class CardPaymentSourceAuthorizationForm < AuthorizationForm
|
24323
24989
|
|
24324
|
-
attr_reader :key, :card_payment_source_id, :order_number, :amount, :currency, :browser_info
|
24990
|
+
attr_reader :key, :card_payment_source_id, :order_number, :amount, :currency, :browser_info, :action_configuration
|
24325
24991
|
|
24326
24992
|
def initialize(incoming={})
|
24327
24993
|
super(:discriminator => AuthorizationForm::Types::CARD_PAYMENT_SOURCE_AUTHORIZATION_FORM)
|
@@ -24333,6 +24999,7 @@ module Io
|
|
24333
24999
|
@amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal)
|
24334
25000
|
@currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
|
24335
25001
|
@browser_info = (x = opts.delete(:browser_info); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::BrowserInfo) ? x : ::Io::Flow::V0::Models::BrowserInfo.new(x)))
|
25002
|
+
@action_configuration = (x = opts.delete(:action_configuration); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ActionConfiguration) ? x : ::Io::Flow::V0::Models::ActionConfiguration.from_json(x)))
|
24336
25003
|
end
|
24337
25004
|
|
24338
25005
|
def to_json
|
@@ -24350,7 +25017,8 @@ module Io
|
|
24350
25017
|
:order_number => order_number,
|
24351
25018
|
:amount => amount.to_f.to_s,
|
24352
25019
|
:currency => currency,
|
24353
|
-
:browser_info => browser_info.nil? ? nil : browser_info.to_hash
|
25020
|
+
:browser_info => browser_info.nil? ? nil : browser_info.to_hash,
|
25021
|
+
:action_configuration => action_configuration.nil? ? nil : action_configuration.to_hash
|
24354
25022
|
}
|
24355
25023
|
end
|
24356
25024
|
|
@@ -27312,14 +27980,15 @@ module Io
|
|
27312
27980
|
# Represents the format used to export price book item documents
|
27313
27981
|
class CsvPriceBookItemExportRow
|
27314
27982
|
|
27315
|
-
attr_reader :price_book_key, :price_book_item_key, :item_number, :item_name, :amount, :item_attributes, :starts_at, :ends_at
|
27983
|
+
attr_reader :price_book_key, :price_book_item_key, :item_number, :sku, :item_name, :amount, :item_attributes, :starts_at, :ends_at
|
27316
27984
|
|
27317
27985
|
def initialize(incoming={})
|
27318
27986
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
27319
|
-
HttpClient::Preconditions.require_keys(opts, [:price_book_key, :price_book_item_key, :item_number, :item_name, :amount, :starts_at], 'CsvPriceBookItemExportRow')
|
27987
|
+
HttpClient::Preconditions.require_keys(opts, [:price_book_key, :price_book_item_key, :item_number, :sku, :item_name, :amount, :starts_at], 'CsvPriceBookItemExportRow')
|
27320
27988
|
@price_book_key = HttpClient::Preconditions.assert_class('price_book_key', opts.delete(:price_book_key), String)
|
27321
27989
|
@price_book_item_key = HttpClient::Preconditions.assert_class('price_book_item_key', opts.delete(:price_book_item_key), String)
|
27322
27990
|
@item_number = HttpClient::Preconditions.assert_class('item_number', opts.delete(:item_number), String)
|
27991
|
+
@sku = HttpClient::Preconditions.assert_class('sku', opts.delete(:sku), String)
|
27323
27992
|
@item_name = HttpClient::Preconditions.assert_class('item_name', opts.delete(:item_name), String)
|
27324
27993
|
@amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal)
|
27325
27994
|
@item_attributes = (x = opts.delete(:item_attributes); x.nil? ? nil : HttpClient::Preconditions.assert_class('item_attributes', x, Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('item_attributes', d[1], String); h })
|
@@ -27340,6 +28009,7 @@ module Io
|
|
27340
28009
|
:price_book_key => price_book_key,
|
27341
28010
|
:price_book_item_key => price_book_item_key,
|
27342
28011
|
:item_number => item_number,
|
28012
|
+
:sku => sku,
|
27343
28013
|
:item_name => item_name,
|
27344
28014
|
:amount => amount.to_f.to_s,
|
27345
28015
|
:item_attributes => item_attributes.nil? ? nil : item_attributes,
|
@@ -28320,11 +28990,12 @@ module Io
|
|
28320
28990
|
|
28321
28991
|
class DeliveryItem
|
28322
28992
|
|
28323
|
-
attr_reader :number, :quantity, :shipment_estimate, :price, :attributes, :center, :line_number
|
28993
|
+
attr_reader :id, :number, :quantity, :shipment_estimate, :price, :attributes, :center, :line_number
|
28324
28994
|
|
28325
28995
|
def initialize(incoming={})
|
28326
28996
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
28327
28997
|
HttpClient::Preconditions.require_keys(opts, [:number, :quantity], 'DeliveryItem')
|
28998
|
+
@id = (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, String))
|
28328
28999
|
@number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
|
28329
29000
|
@quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
|
28330
29001
|
@shipment_estimate = (x = opts.delete(:shipment_estimate); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::DatetimeRange) ? x : ::Io::Flow::V0::Models::DatetimeRange.new(x)))
|
@@ -28344,6 +29015,7 @@ module Io
|
|
28344
29015
|
|
28345
29016
|
def to_hash
|
28346
29017
|
{
|
29018
|
+
:id => id,
|
28347
29019
|
:number => number,
|
28348
29020
|
:quantity => quantity,
|
28349
29021
|
:shipment_estimate => shipment_estimate.nil? ? nil : shipment_estimate.to_hash,
|
@@ -29222,7 +29894,7 @@ module Io
|
|
29222
29894
|
# you can capture up to the amount of the authorization.
|
29223
29895
|
class DirectAuthorizationForm < AuthorizationForm
|
29224
29896
|
|
29225
|
-
attr_reader :token, :amount, :currency, :customer, :key, :cvv, :attributes, :destination, :billing_address, :ip, :options, :redirect_urls, :browser_info
|
29897
|
+
attr_reader :token, :amount, :currency, :customer, :key, :cvv, :attributes, :destination, :billing_address, :ip, :options, :redirect_urls, :browser_info, :action_configuration
|
29226
29898
|
|
29227
29899
|
def initialize(incoming={})
|
29228
29900
|
super(:discriminator => AuthorizationForm::Types::DIRECT_AUTHORIZATION_FORM)
|
@@ -29241,6 +29913,7 @@ module Io
|
|
29241
29913
|
@options = (x = opts.delete(:options); x.nil? ? nil : HttpClient::Preconditions.assert_class('options', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::AuthorizationOption) ? x : ::Io::Flow::V0::Models::AuthorizationOption.apply(x)) })
|
29242
29914
|
@redirect_urls = (x = opts.delete(:redirect_urls); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::PostPaymentRedirectUrls) ? x : ::Io::Flow::V0::Models::PostPaymentRedirectUrls.new(x)))
|
29243
29915
|
@browser_info = (x = opts.delete(:browser_info); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::BrowserInfo) ? x : ::Io::Flow::V0::Models::BrowserInfo.new(x)))
|
29916
|
+
@action_configuration = (x = opts.delete(:action_configuration); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ActionConfiguration) ? x : ::Io::Flow::V0::Models::ActionConfiguration.from_json(x)))
|
29244
29917
|
end
|
29245
29918
|
|
29246
29919
|
def to_json
|
@@ -29265,7 +29938,8 @@ module Io
|
|
29265
29938
|
:ip => ip,
|
29266
29939
|
:options => options.nil? ? nil : options.map { |o| o.value },
|
29267
29940
|
:redirect_urls => redirect_urls.nil? ? nil : redirect_urls.to_hash,
|
29268
|
-
:browser_info => browser_info.nil? ? nil : browser_info.to_hash
|
29941
|
+
:browser_info => browser_info.nil? ? nil : browser_info.to_hash,
|
29942
|
+
:action_configuration => action_configuration.nil? ? nil : action_configuration.to_hash
|
29269
29943
|
}
|
29270
29944
|
end
|
29271
29945
|
|
@@ -32097,13 +32771,12 @@ module Io
|
|
32097
32771
|
# Indicates a field is required
|
32098
32772
|
class FieldValidationRequired < FieldValidationRule
|
32099
32773
|
|
32100
|
-
attr_reader :
|
32774
|
+
attr_reader :placeholder
|
32101
32775
|
|
32102
32776
|
def initialize(incoming={})
|
32103
32777
|
super(:discriminator => FieldValidationRule::Types::FIELD_VALIDATION_REQUIRED)
|
32104
32778
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
32105
|
-
HttpClient::Preconditions.
|
32106
|
-
@unused = HttpClient::Preconditions.assert_class('unused', opts.delete(:unused), String)
|
32779
|
+
@placeholder = (x = opts.delete(:placeholder); x.nil? ? nil : HttpClient::Preconditions.assert_class('placeholder', x, String))
|
32107
32780
|
end
|
32108
32781
|
|
32109
32782
|
def to_json
|
@@ -32116,7 +32789,7 @@ module Io
|
|
32116
32789
|
|
32117
32790
|
def subtype_to_hash
|
32118
32791
|
{
|
32119
|
-
:
|
32792
|
+
:placeholder => placeholder
|
32120
32793
|
}
|
32121
32794
|
end
|
32122
32795
|
|
@@ -33167,12 +33840,11 @@ module Io
|
|
33167
33840
|
|
33168
33841
|
class GraphqlRequest
|
33169
33842
|
|
33170
|
-
attr_reader :
|
33843
|
+
attr_reader :query, :operation_name, :variables
|
33171
33844
|
|
33172
33845
|
def initialize(incoming={})
|
33173
33846
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
33174
|
-
HttpClient::Preconditions.require_keys(opts, [:
|
33175
|
-
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
33847
|
+
HttpClient::Preconditions.require_keys(opts, [:query], 'GraphqlRequest')
|
33176
33848
|
@query = HttpClient::Preconditions.assert_class('query', opts.delete(:query), String)
|
33177
33849
|
@operation_name = (x = opts.delete(:operation_name); x.nil? ? nil : HttpClient::Preconditions.assert_class('operation_name', x, String))
|
33178
33850
|
@variables = (x = opts.delete(:variables); x.nil? ? nil : HttpClient::Preconditions.assert_class('variables', x, Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('variables', d[1], String); h })
|
@@ -33188,7 +33860,6 @@ module Io
|
|
33188
33860
|
|
33189
33861
|
def to_hash
|
33190
33862
|
{
|
33191
|
-
:id => id,
|
33192
33863
|
:query => query,
|
33193
33864
|
:operation_name => operation_name,
|
33194
33865
|
:variables => variables.nil? ? nil : variables
|
@@ -33199,13 +33870,11 @@ module Io
|
|
33199
33870
|
|
33200
33871
|
class GraphqlResponse
|
33201
33872
|
|
33202
|
-
attr_reader :
|
33873
|
+
attr_reader :data, :errors
|
33203
33874
|
|
33204
33875
|
def initialize(incoming={})
|
33205
33876
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
33206
|
-
HttpClient::Preconditions.
|
33207
|
-
@request_id = HttpClient::Preconditions.assert_class('request_id', opts.delete(:request_id), String)
|
33208
|
-
@data = HttpClient::Preconditions.assert_class('data', HttpClient::Helper.to_object(opts.delete(:data)), Hash)
|
33877
|
+
@data = (x = opts.delete(:data); x.nil? ? nil : HttpClient::Preconditions.assert_class('data', HttpClient::Helper.to_object(x), Hash))
|
33209
33878
|
@errors = (x = opts.delete(:errors); x.nil? ? nil : HttpClient::Preconditions.assert_class('errors', x, Array).map { |v| HttpClient::Preconditions.assert_class('errors', HttpClient::Helper.to_object(v), Hash) })
|
33210
33879
|
end
|
33211
33880
|
|
@@ -33219,7 +33888,6 @@ module Io
|
|
33219
33888
|
|
33220
33889
|
def to_hash
|
33221
33890
|
{
|
33222
|
-
:request_id => request_id,
|
33223
33891
|
:data => data,
|
33224
33892
|
:errors => errors.nil? ? nil : errors
|
33225
33893
|
}
|
@@ -35517,7 +36185,7 @@ module Io
|
|
35517
36185
|
# many clients, this will map to a Sku.
|
35518
36186
|
class Item
|
35519
36187
|
|
35520
|
-
attr_reader :id, :number, :locale, :name, :price, :categories, :description, :attributes, :dimensions, :images, :local
|
36188
|
+
attr_reader :id, :number, :locale, :name, :price, :categories, :description, :attributes, :dimensions, :images, :local, :created_at, :updated_at
|
35521
36189
|
|
35522
36190
|
def initialize(incoming={})
|
35523
36191
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
@@ -35533,6 +36201,8 @@ module Io
|
|
35533
36201
|
@dimensions = (x = opts.delete(:dimensions); x.is_a?(::Io::Flow::V0::Models::Dimensions) ? x : ::Io::Flow::V0::Models::Dimensions.new(x))
|
35534
36202
|
@images = HttpClient::Preconditions.assert_class('images', (x = opts.delete(:images); x.nil? ? [] : x), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::Image) ? x : ::Io::Flow::V0::Models::Image.new(x)) }
|
35535
36203
|
@local = (x = opts.delete(:local); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Local) ? x : ::Io::Flow::V0::Models::Local.new(x)))
|
36204
|
+
@created_at = (x = opts.delete(:created_at); x.nil? ? nil : HttpClient::Preconditions.assert_class('created_at', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
|
36205
|
+
@updated_at = (x = opts.delete(:updated_at); x.nil? ? nil : HttpClient::Preconditions.assert_class('updated_at', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
|
35536
36206
|
end
|
35537
36207
|
|
35538
36208
|
def to_json
|
@@ -35555,7 +36225,9 @@ module Io
|
|
35555
36225
|
:attributes => attributes,
|
35556
36226
|
:dimensions => dimensions.to_hash,
|
35557
36227
|
:images => images.map { |o| o.to_hash },
|
35558
|
-
:local => local.nil? ? nil : local.to_hash
|
36228
|
+
:local => local.nil? ? nil : local.to_hash,
|
36229
|
+
:created_at => created_at,
|
36230
|
+
:updated_at => updated_at
|
35559
36231
|
}
|
35560
36232
|
end
|
35561
36233
|
|
@@ -36769,11 +37441,12 @@ module Io
|
|
36769
37441
|
# Provides display data for a line item.
|
36770
37442
|
class Line
|
36771
37443
|
|
36772
|
-
attr_reader :item_number, :quantity, :price, :total, :attributes
|
37444
|
+
attr_reader :id, :item_number, :quantity, :price, :total, :attributes
|
36773
37445
|
|
36774
37446
|
def initialize(incoming={})
|
36775
37447
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
36776
37448
|
HttpClient::Preconditions.require_keys(opts, [:item_number, :quantity, :price, :total], 'Line')
|
37449
|
+
@id = (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, String))
|
36777
37450
|
@item_number = HttpClient::Preconditions.assert_class('item_number', opts.delete(:item_number), String)
|
36778
37451
|
@quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
|
36779
37452
|
@price = (x = opts.delete(:price); x.is_a?(::Io::Flow::V0::Models::PriceWithBase) ? x : ::Io::Flow::V0::Models::PriceWithBase.new(x))
|
@@ -36791,6 +37464,7 @@ module Io
|
|
36791
37464
|
|
36792
37465
|
def to_hash
|
36793
37466
|
{
|
37467
|
+
:id => id,
|
36794
37468
|
:item_number => item_number,
|
36795
37469
|
:quantity => quantity,
|
36796
37470
|
:price => price.to_hash,
|
@@ -36840,6 +37514,32 @@ module Io
|
|
36840
37514
|
|
36841
37515
|
end
|
36842
37516
|
|
37517
|
+
class LineItemAttributesForm
|
37518
|
+
|
37519
|
+
attr_reader :attributes
|
37520
|
+
|
37521
|
+
def initialize(incoming={})
|
37522
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
37523
|
+
HttpClient::Preconditions.require_keys(opts, [:attributes], 'LineItemAttributesForm')
|
37524
|
+
@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 }
|
37525
|
+
end
|
37526
|
+
|
37527
|
+
def to_json
|
37528
|
+
JSON.dump(to_hash)
|
37529
|
+
end
|
37530
|
+
|
37531
|
+
def copy(incoming={})
|
37532
|
+
LineItemAttributesForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
37533
|
+
end
|
37534
|
+
|
37535
|
+
def to_hash
|
37536
|
+
{
|
37537
|
+
:attributes => attributes
|
37538
|
+
}
|
37539
|
+
end
|
37540
|
+
|
37541
|
+
end
|
37542
|
+
|
36843
37543
|
# Line items represent the items a consumer is purchasing, including additional
|
36844
37544
|
# information to complete the transaction. Note that you may pass in as many
|
36845
37545
|
# line items as you like - including repeating item numbers across line items.
|
@@ -36883,6 +37583,32 @@ module Io
|
|
36883
37583
|
|
36884
37584
|
end
|
36885
37585
|
|
37586
|
+
class LineItemQuantityForm
|
37587
|
+
|
37588
|
+
attr_reader :quantity
|
37589
|
+
|
37590
|
+
def initialize(incoming={})
|
37591
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
37592
|
+
HttpClient::Preconditions.require_keys(opts, [:quantity], 'LineItemQuantityForm')
|
37593
|
+
@quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
|
37594
|
+
end
|
37595
|
+
|
37596
|
+
def to_json
|
37597
|
+
JSON.dump(to_hash)
|
37598
|
+
end
|
37599
|
+
|
37600
|
+
def copy(incoming={})
|
37601
|
+
LineItemQuantityForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
37602
|
+
end
|
37603
|
+
|
37604
|
+
def to_hash
|
37605
|
+
{
|
37606
|
+
:quantity => quantity
|
37607
|
+
}
|
37608
|
+
end
|
37609
|
+
|
37610
|
+
end
|
37611
|
+
|
36886
37612
|
class Link
|
36887
37613
|
|
36888
37614
|
attr_reader :url
|
@@ -37396,11 +38122,12 @@ module Io
|
|
37396
38122
|
# Line items on the order, with localized pricing information
|
37397
38123
|
class LocalizedLineItem
|
37398
38124
|
|
37399
|
-
attr_reader :number, :name, :quantity, :center, :price, :discount, :discounts, :attributes, :local, :shipment_estimate, :price_source
|
38125
|
+
attr_reader :id, :number, :name, :quantity, :center, :price, :discount, :discounts, :attributes, :local, :shipment_estimate, :price_source
|
37400
38126
|
|
37401
38127
|
def initialize(incoming={})
|
37402
38128
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
37403
38129
|
HttpClient::Preconditions.require_keys(opts, [:number, :name, :quantity, :local], 'LocalizedLineItem')
|
38130
|
+
@id = (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, String))
|
37404
38131
|
@number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
|
37405
38132
|
@name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
|
37406
38133
|
@quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
|
@@ -37424,6 +38151,7 @@ module Io
|
|
37424
38151
|
|
37425
38152
|
def to_hash
|
37426
38153
|
{
|
38154
|
+
:id => id,
|
37427
38155
|
:number => number,
|
37428
38156
|
:name => name,
|
37429
38157
|
:quantity => quantity,
|
@@ -38214,7 +38942,7 @@ module Io
|
|
38214
38942
|
# you can capture up to the amount of the authorization
|
38215
38943
|
class MerchantOfRecordAuthorizationForm < AuthorizationForm
|
38216
38944
|
|
38217
|
-
attr_reader :token, :order_number, :amount, :currency, :key, :cvv, :attributes, :ip, :options, :redirect_urls, :browser_info
|
38945
|
+
attr_reader :token, :order_number, :amount, :currency, :key, :cvv, :attributes, :ip, :options, :redirect_urls, :browser_info, :action_configuration
|
38218
38946
|
|
38219
38947
|
def initialize(incoming={})
|
38220
38948
|
super(:discriminator => AuthorizationForm::Types::MERCHANT_OF_RECORD_AUTHORIZATION_FORM)
|
@@ -38231,6 +38959,7 @@ module Io
|
|
38231
38959
|
@options = (x = opts.delete(:options); x.nil? ? nil : HttpClient::Preconditions.assert_class('options', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::AuthorizationOption) ? x : ::Io::Flow::V0::Models::AuthorizationOption.apply(x)) })
|
38232
38960
|
@redirect_urls = (x = opts.delete(:redirect_urls); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::PostPaymentRedirectUrls) ? x : ::Io::Flow::V0::Models::PostPaymentRedirectUrls.new(x)))
|
38233
38961
|
@browser_info = (x = opts.delete(:browser_info); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::BrowserInfo) ? x : ::Io::Flow::V0::Models::BrowserInfo.new(x)))
|
38962
|
+
@action_configuration = (x = opts.delete(:action_configuration); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ActionConfiguration) ? x : ::Io::Flow::V0::Models::ActionConfiguration.from_json(x)))
|
38234
38963
|
end
|
38235
38964
|
|
38236
38965
|
def to_json
|
@@ -38253,7 +38982,8 @@ module Io
|
|
38253
38982
|
:ip => ip,
|
38254
38983
|
:options => options.nil? ? nil : options.map { |o| o.value },
|
38255
38984
|
:redirect_urls => redirect_urls.nil? ? nil : redirect_urls.to_hash,
|
38256
|
-
:browser_info => browser_info.nil? ? nil : browser_info.to_hash
|
38985
|
+
:browser_info => browser_info.nil? ? nil : browser_info.to_hash,
|
38986
|
+
:action_configuration => action_configuration.nil? ? nil : action_configuration.to_hash
|
38257
38987
|
}
|
38258
38988
|
end
|
38259
38989
|
|
@@ -40023,6 +40753,32 @@ module Io
|
|
40023
40753
|
|
40024
40754
|
end
|
40025
40755
|
|
40756
|
+
class OrderNumberGeneratorGeneratedNumber
|
40757
|
+
|
40758
|
+
attr_reader :number
|
40759
|
+
|
40760
|
+
def initialize(incoming={})
|
40761
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
40762
|
+
HttpClient::Preconditions.require_keys(opts, [:number], 'OrderNumberGeneratorGeneratedNumber')
|
40763
|
+
@number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
|
40764
|
+
end
|
40765
|
+
|
40766
|
+
def to_json
|
40767
|
+
JSON.dump(to_hash)
|
40768
|
+
end
|
40769
|
+
|
40770
|
+
def copy(incoming={})
|
40771
|
+
OrderNumberGeneratorGeneratedNumber.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
40772
|
+
end
|
40773
|
+
|
40774
|
+
def to_hash
|
40775
|
+
{
|
40776
|
+
:number => number
|
40777
|
+
}
|
40778
|
+
end
|
40779
|
+
|
40780
|
+
end
|
40781
|
+
|
40026
40782
|
# Hexadecimal generator generates a random string, starting with a letter, of a
|
40027
40783
|
# given length
|
40028
40784
|
class OrderNumberGeneratorHexadecimal < OrderNumberGenerator
|
@@ -40715,7 +41471,7 @@ module Io
|
|
40715
41471
|
|
40716
41472
|
end
|
40717
41473
|
|
40718
|
-
# Defines the data needed to attach an
|
41474
|
+
# Defines the data needed to attach an identifier to each order created by a
|
40719
41475
|
# checkout.
|
40720
41476
|
class OrderSubmissionIdentifierForm
|
40721
41477
|
|
@@ -40751,7 +41507,7 @@ module Io
|
|
40751
41507
|
# flattened to keys.
|
40752
41508
|
class OrderSummary
|
40753
41509
|
|
40754
|
-
attr_reader :number, :subtotal, :shipping, :tax, :duty, :insurance, :discount, :surcharges, :adjustment, :total, :lines, :identifiers
|
41510
|
+
attr_reader :number, :subtotal, :shipping, :tax, :duty, :insurance, :discount, :surcharges, :adjustment, :total, :lines, :identifiers, :attributes
|
40755
41511
|
|
40756
41512
|
def initialize(incoming={})
|
40757
41513
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
@@ -40768,6 +41524,7 @@ module Io
|
|
40768
41524
|
@total = (x = opts.delete(:total); x.is_a?(::Io::Flow::V0::Models::OrderSummaryPriceDetail) ? x : ::Io::Flow::V0::Models::OrderSummaryPriceDetail.new(x))
|
40769
41525
|
@lines = HttpClient::Preconditions.assert_class('lines', opts.delete(:lines), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::OrderSummaryLineItem) ? x : ::Io::Flow::V0::Models::OrderSummaryLineItem.new(x)) }
|
40770
41526
|
@identifiers = (x = opts.delete(:identifiers); x.nil? ? nil : HttpClient::Preconditions.assert_class('identifiers', x, Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('identifiers', d[1], String); h })
|
41527
|
+
@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 })
|
40771
41528
|
end
|
40772
41529
|
|
40773
41530
|
def to_json
|
@@ -40791,7 +41548,8 @@ module Io
|
|
40791
41548
|
:adjustment => adjustment.nil? ? nil : adjustment.to_hash,
|
40792
41549
|
:total => total.to_hash,
|
40793
41550
|
:lines => lines.map { |o| o.to_hash },
|
40794
|
-
:identifiers => identifiers.nil? ? nil : identifiers
|
41551
|
+
:identifiers => identifiers.nil? ? nil : identifiers,
|
41552
|
+
:attributes => attributes.nil? ? nil : attributes
|
40795
41553
|
}
|
40796
41554
|
end
|
40797
41555
|
|
@@ -40899,11 +41657,12 @@ module Io
|
|
40899
41657
|
|
40900
41658
|
class OrderSummaryLineItem
|
40901
41659
|
|
40902
|
-
attr_reader :item, :quantity, :discount, :tax, :duty, :total, :price_attributes
|
41660
|
+
attr_reader :id, :item, :quantity, :discount, :tax, :duty, :total, :price_attributes, :attributes
|
40903
41661
|
|
40904
41662
|
def initialize(incoming={})
|
40905
41663
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
40906
41664
|
HttpClient::Preconditions.require_keys(opts, [:item, :quantity, :total, :price_attributes], 'OrderSummaryLineItem')
|
41665
|
+
@id = (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, String))
|
40907
41666
|
@item = (x = opts.delete(:item); x.is_a?(::Io::Flow::V0::Models::OrderSummaryItem) ? x : ::Io::Flow::V0::Models::OrderSummaryItem.new(x))
|
40908
41667
|
@quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
|
40909
41668
|
@discount = (x = opts.delete(:discount); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x)))
|
@@ -40911,6 +41670,7 @@ module Io
|
|
40911
41670
|
@duty = (x = opts.delete(:duty); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::OrderSummaryLevy) ? x : ::Io::Flow::V0::Models::OrderSummaryLevy.new(x)))
|
40912
41671
|
@total = (x = opts.delete(:total); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x))
|
40913
41672
|
@price_attributes = HttpClient::Preconditions.assert_class('price_attributes', opts.delete(:price_attributes), Hash).inject({}) { |h, d| h[d[0]] = (x = d[1]; x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x)); h }
|
41673
|
+
@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 })
|
40914
41674
|
end
|
40915
41675
|
|
40916
41676
|
def to_json
|
@@ -40923,13 +41683,15 @@ module Io
|
|
40923
41683
|
|
40924
41684
|
def to_hash
|
40925
41685
|
{
|
41686
|
+
:id => id,
|
40926
41687
|
:item => item.to_hash,
|
40927
41688
|
:quantity => quantity,
|
40928
41689
|
:discount => discount.nil? ? nil : discount.to_hash,
|
40929
41690
|
:tax => tax.nil? ? nil : tax.to_hash,
|
40930
41691
|
:duty => duty.nil? ? nil : duty.to_hash,
|
40931
41692
|
:total => total.to_hash,
|
40932
|
-
:price_attributes => price_attributes.inject({}) { |hash, o| hash[o[0]] = o[1].nil? ? nil : o[1].to_hash; hash }
|
41693
|
+
:price_attributes => price_attributes.inject({}) { |hash, o| hash[o[0]] = o[1].nil? ? nil : o[1].to_hash; hash },
|
41694
|
+
:attributes => attributes.nil? ? nil : attributes
|
40933
41695
|
}
|
40934
41696
|
end
|
40935
41697
|
|
@@ -41143,7 +41905,7 @@ module Io
|
|
41143
41905
|
# currently operating in.
|
41144
41906
|
class Organization < ExpandableOrganization
|
41145
41907
|
|
41146
|
-
attr_reader :id, :name, :environment, :parent, :defaults, :created_at
|
41908
|
+
attr_reader :id, :name, :environment, :parent, :defaults, :created_at, :status
|
41147
41909
|
|
41148
41910
|
def initialize(incoming={})
|
41149
41911
|
super(:discriminator => ExpandableOrganization::Types::ORGANIZATION)
|
@@ -41155,6 +41917,7 @@ module Io
|
|
41155
41917
|
@parent = (x = opts.delete(:parent); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::OrganizationReference) ? x : ::Io::Flow::V0::Models::OrganizationReference.new(x)))
|
41156
41918
|
@defaults = (x = opts.delete(:defaults); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::OrganizationDefaults) ? x : ::Io::Flow::V0::Models::OrganizationDefaults.new(x)))
|
41157
41919
|
@created_at = (x = opts.delete(:created_at); x.nil? ? nil : HttpClient::Preconditions.assert_class('created_at', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
|
41920
|
+
@status = (x = (x = opts.delete(:status); x.nil? ? "active" : x); x.is_a?(::Io::Flow::V0::Models::OrganizationStatus) ? x : ::Io::Flow::V0::Models::OrganizationStatus.apply(x))
|
41158
41921
|
end
|
41159
41922
|
|
41160
41923
|
def to_json
|
@@ -41172,7 +41935,8 @@ module Io
|
|
41172
41935
|
:environment => environment.value,
|
41173
41936
|
:parent => parent.nil? ? nil : parent.to_hash,
|
41174
41937
|
:defaults => defaults.nil? ? nil : defaults.to_hash,
|
41175
|
-
:created_at => created_at
|
41938
|
+
:created_at => created_at,
|
41939
|
+
:status => status.value
|
41176
41940
|
}
|
41177
41941
|
end
|
41178
41942
|
|
@@ -41576,7 +42340,7 @@ module Io
|
|
41576
42340
|
# Either id or name is required.
|
41577
42341
|
class OrganizationForm
|
41578
42342
|
|
41579
|
-
attr_reader :id, :name, :environment, :parent_id, :defaults
|
42343
|
+
attr_reader :id, :name, :environment, :parent_id, :defaults, :status
|
41580
42344
|
|
41581
42345
|
def initialize(incoming={})
|
41582
42346
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
@@ -41585,6 +42349,7 @@ module Io
|
|
41585
42349
|
@environment = (x = (x = opts.delete(:environment); x.nil? ? "production" : x); x.is_a?(::Io::Flow::V0::Models::Environment) ? x : ::Io::Flow::V0::Models::Environment.apply(x))
|
41586
42350
|
@parent_id = (x = opts.delete(:parent_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('parent_id', x, String))
|
41587
42351
|
@defaults = (x = opts.delete(:defaults); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::OrganizationDefaults) ? x : ::Io::Flow::V0::Models::OrganizationDefaults.new(x)))
|
42352
|
+
@status = (x = (x = opts.delete(:status); x.nil? ? "active" : x); x.is_a?(::Io::Flow::V0::Models::OrganizationStatus) ? x : ::Io::Flow::V0::Models::OrganizationStatus.apply(x))
|
41588
42353
|
end
|
41589
42354
|
|
41590
42355
|
def to_json
|
@@ -41601,7 +42366,8 @@ module Io
|
|
41601
42366
|
:name => name,
|
41602
42367
|
:environment => environment.value,
|
41603
42368
|
:parent_id => parent_id,
|
41604
|
-
:defaults => defaults.nil? ? nil : defaults.to_hash
|
42369
|
+
:defaults => defaults.nil? ? nil : defaults.to_hash,
|
42370
|
+
:status => status.value
|
41605
42371
|
}
|
41606
42372
|
end
|
41607
42373
|
|
@@ -41610,7 +42376,7 @@ module Io
|
|
41610
42376
|
# Data required to upsert an organization.
|
41611
42377
|
class OrganizationPutForm
|
41612
42378
|
|
41613
|
-
attr_reader :name, :environment, :parent_id, :defaults
|
42379
|
+
attr_reader :name, :environment, :parent_id, :defaults, :status
|
41614
42380
|
|
41615
42381
|
def initialize(incoming={})
|
41616
42382
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
@@ -41618,6 +42384,7 @@ module Io
|
|
41618
42384
|
@environment = (x = opts.delete(:environment); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Environment) ? x : ::Io::Flow::V0::Models::Environment.apply(x)))
|
41619
42385
|
@parent_id = (x = opts.delete(:parent_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('parent_id', x, String))
|
41620
42386
|
@defaults = (x = opts.delete(:defaults); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::OrganizationDefaults) ? x : ::Io::Flow::V0::Models::OrganizationDefaults.new(x)))
|
42387
|
+
@status = (x = (x = opts.delete(:status); x.nil? ? "active" : x); x.is_a?(::Io::Flow::V0::Models::OrganizationStatus) ? x : ::Io::Flow::V0::Models::OrganizationStatus.apply(x))
|
41621
42388
|
end
|
41622
42389
|
|
41623
42390
|
def to_json
|
@@ -41633,7 +42400,8 @@ module Io
|
|
41633
42400
|
:name => name,
|
41634
42401
|
:environment => environment.nil? ? nil : environment.value,
|
41635
42402
|
:parent_id => parent_id,
|
41636
|
-
:defaults => defaults.nil? ? nil : defaults.to_hash
|
42403
|
+
:defaults => defaults.nil? ? nil : defaults.to_hash,
|
42404
|
+
:status => status.value
|
41637
42405
|
}
|
41638
42406
|
end
|
41639
42407
|
|
@@ -43312,7 +44080,7 @@ module Io
|
|
43312
44080
|
# collection of items, and metadata about those options
|
43313
44081
|
class PhysicalDelivery < Delivery
|
43314
44082
|
|
43315
|
-
attr_reader :id, :key, :center, :items, :options, :special_services, :prices, :total, :goods_supply
|
44083
|
+
attr_reader :id, :key, :center, :items, :options, :special_services, :prices, :total, :goods_supply, :merchant_of_record_flow_entity
|
43316
44084
|
|
43317
44085
|
def initialize(incoming={})
|
43318
44086
|
super(:discriminator => Delivery::Types::PHYSICAL_DELIVERY)
|
@@ -43327,6 +44095,7 @@ module Io
|
|
43327
44095
|
@prices = (x = opts.delete(:prices); x.nil? ? nil : HttpClient::Preconditions.assert_class('prices', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::OrderPriceDetail) ? x : ::Io::Flow::V0::Models::OrderPriceDetail.new(x)) })
|
43328
44096
|
@total = (x = opts.delete(:total); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::LocalizedTotal) ? x : ::Io::Flow::V0::Models::LocalizedTotal.new(x)))
|
43329
44097
|
@goods_supply = (x = opts.delete(:goods_supply); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::GoodsSupply) ? x : ::Io::Flow::V0::Models::GoodsSupply.apply(x)))
|
44098
|
+
@merchant_of_record_flow_entity = (x = opts.delete(:merchant_of_record_flow_entity); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::FlowEntity) ? x : ::Io::Flow::V0::Models::FlowEntity.apply(x)))
|
43330
44099
|
end
|
43331
44100
|
|
43332
44101
|
def to_json
|
@@ -43347,7 +44116,8 @@ module Io
|
|
43347
44116
|
:special_services => special_services.nil? ? nil : special_services.map { |o| o.value },
|
43348
44117
|
:prices => prices.nil? ? nil : prices.map { |o| o.to_hash },
|
43349
44118
|
:total => total.nil? ? nil : total.to_hash,
|
43350
|
-
:goods_supply => goods_supply.nil? ? nil : goods_supply.value
|
44119
|
+
:goods_supply => goods_supply.nil? ? nil : goods_supply.value,
|
44120
|
+
:merchant_of_record_flow_entity => merchant_of_record_flow_entity.nil? ? nil : merchant_of_record_flow_entity.value
|
43351
44121
|
}
|
43352
44122
|
end
|
43353
44123
|
|
@@ -43595,7 +44365,7 @@ module Io
|
|
43595
44365
|
# export
|
43596
44366
|
class PriceBookItemExportType < ExportType
|
43597
44367
|
|
43598
|
-
attr_reader :price_book_key, :item_numbers, :start_date, :end_date
|
44368
|
+
attr_reader :price_book_key, :item_numbers, :start_date, :end_date, :item_identifier
|
43599
44369
|
|
43600
44370
|
def initialize(incoming={})
|
43601
44371
|
super(:discriminator => ExportType::Types::PRICE_BOOK_ITEM_EXPORT_TYPE)
|
@@ -43604,6 +44374,7 @@ module Io
|
|
43604
44374
|
@item_numbers = (x = opts.delete(:item_numbers); x.nil? ? nil : HttpClient::Preconditions.assert_class('item_numbers', x, Array).map { |v| HttpClient::Preconditions.assert_class('item_numbers', v, String) })
|
43605
44375
|
@start_date = (x = opts.delete(:start_date); x.nil? ? nil : HttpClient::Preconditions.assert_class('start_date', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
|
43606
44376
|
@end_date = (x = opts.delete(:end_date); x.nil? ? nil : HttpClient::Preconditions.assert_class('end_date', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
|
44377
|
+
@item_identifier = (x = (x = opts.delete(:item_identifier); x.nil? ? "item_number" : x); x.is_a?(::Io::Flow::V0::Models::ItemIdentifier) ? x : ::Io::Flow::V0::Models::ItemIdentifier.apply(x))
|
43607
44378
|
end
|
43608
44379
|
|
43609
44380
|
def to_json
|
@@ -43619,7 +44390,8 @@ module Io
|
|
43619
44390
|
:price_book_key => price_book_key,
|
43620
44391
|
:item_numbers => item_numbers.nil? ? nil : item_numbers,
|
43621
44392
|
:start_date => start_date,
|
43622
|
-
:end_date => end_date
|
44393
|
+
:end_date => end_date,
|
44394
|
+
:item_identifier => item_identifier.value
|
43623
44395
|
}
|
43624
44396
|
end
|
43625
44397
|
|
@@ -52181,6 +52953,158 @@ module Io
|
|
52181
52953
|
|
52182
52954
|
end
|
52183
52955
|
|
52956
|
+
# Information necessary to perform a 3ds Challenge action inline to the user
|
52957
|
+
# experience.
|
52958
|
+
class ThreedsChallengeActionDetails < AuthorizationResultActionDetails
|
52959
|
+
|
52960
|
+
attr_reader :threeds_challenge_action, :expires_at
|
52961
|
+
|
52962
|
+
def initialize(incoming={})
|
52963
|
+
super(:discriminator => AuthorizationResultActionDetails::Types::THREEDS_CHALLENGE_ACTION_DETAILS)
|
52964
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
52965
|
+
HttpClient::Preconditions.require_keys(opts, [:threeds_challenge_action, :expires_at], 'ThreedsChallengeActionDetails')
|
52966
|
+
@threeds_challenge_action = (x = opts.delete(:threeds_challenge_action); x.is_a?(::Io::Flow::V0::Models::ThreedsChallengeAction) ? x : ::Io::Flow::V0::Models::ThreedsChallengeAction.from_json(x))
|
52967
|
+
@expires_at = HttpClient::Preconditions.assert_class('expires_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:expires_at)), DateTime)
|
52968
|
+
end
|
52969
|
+
|
52970
|
+
def to_json
|
52971
|
+
JSON.dump(to_hash)
|
52972
|
+
end
|
52973
|
+
|
52974
|
+
def copy(incoming={})
|
52975
|
+
ThreedsChallengeActionDetails.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
52976
|
+
end
|
52977
|
+
|
52978
|
+
def subtype_to_hash
|
52979
|
+
{
|
52980
|
+
:threeds_challenge_action => threeds_challenge_action.to_hash,
|
52981
|
+
:expires_at => expires_at
|
52982
|
+
}
|
52983
|
+
end
|
52984
|
+
|
52985
|
+
end
|
52986
|
+
|
52987
|
+
# Information necessary to perform a 3ds Identify action inline to the user
|
52988
|
+
# experience.
|
52989
|
+
class ThreedsIdentifyActionDetails < AuthorizationResultActionDetails
|
52990
|
+
|
52991
|
+
attr_reader :threeds_identify_action, :expires_at
|
52992
|
+
|
52993
|
+
def initialize(incoming={})
|
52994
|
+
super(:discriminator => AuthorizationResultActionDetails::Types::THREEDS_IDENTIFY_ACTION_DETAILS)
|
52995
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
52996
|
+
HttpClient::Preconditions.require_keys(opts, [:threeds_identify_action, :expires_at], 'ThreedsIdentifyActionDetails')
|
52997
|
+
@threeds_identify_action = (x = opts.delete(:threeds_identify_action); x.is_a?(::Io::Flow::V0::Models::ThreedsIdentifyAction) ? x : ::Io::Flow::V0::Models::ThreedsIdentifyAction.from_json(x))
|
52998
|
+
@expires_at = HttpClient::Preconditions.assert_class('expires_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:expires_at)), DateTime)
|
52999
|
+
end
|
53000
|
+
|
53001
|
+
def to_json
|
53002
|
+
JSON.dump(to_hash)
|
53003
|
+
end
|
53004
|
+
|
53005
|
+
def copy(incoming={})
|
53006
|
+
ThreedsIdentifyActionDetails.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
53007
|
+
end
|
53008
|
+
|
53009
|
+
def subtype_to_hash
|
53010
|
+
{
|
53011
|
+
:threeds_identify_action => threeds_identify_action.to_hash,
|
53012
|
+
:expires_at => expires_at
|
53013
|
+
}
|
53014
|
+
end
|
53015
|
+
|
53016
|
+
end
|
53017
|
+
|
53018
|
+
# Instructions to the card issuer to render challenges to the user
|
53019
|
+
class ThreedsTwoBrowserActionConfiguration < ActionConfiguration
|
53020
|
+
|
53021
|
+
attr_reader :viewport
|
53022
|
+
|
53023
|
+
def initialize(incoming={})
|
53024
|
+
super(:discriminator => ActionConfiguration::Types::THREEDS_TWO_BROWSER_ACTION_CONFIGURATION)
|
53025
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
53026
|
+
@viewport = (x = (x = opts.delete(:viewport); x.nil? ? "xxx_small" : x); x.is_a?(::Io::Flow::V0::Models::ThreedsTwoChallengeViewport) ? x : ::Io::Flow::V0::Models::ThreedsTwoChallengeViewport.apply(x))
|
53027
|
+
end
|
53028
|
+
|
53029
|
+
def to_json
|
53030
|
+
JSON.dump(to_hash)
|
53031
|
+
end
|
53032
|
+
|
53033
|
+
def copy(incoming={})
|
53034
|
+
ThreedsTwoBrowserActionConfiguration.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
53035
|
+
end
|
53036
|
+
|
53037
|
+
def subtype_to_hash
|
53038
|
+
{
|
53039
|
+
:viewport => viewport.value
|
53040
|
+
}
|
53041
|
+
end
|
53042
|
+
|
53043
|
+
end
|
53044
|
+
|
53045
|
+
# Data that must be passed to the 3DS Client to help the issuer ACS render a
|
53046
|
+
# challenge for the user.
|
53047
|
+
class ThreedsTwoChallengeRequest < ThreedsChallengeAction
|
53048
|
+
|
53049
|
+
attr_reader :acs_url, :challenge_request, :session_data
|
53050
|
+
|
53051
|
+
def initialize(incoming={})
|
53052
|
+
super(:discriminator => ThreedsChallengeAction::Types::THREEDS_TWO_CHALLENGE_REQUEST)
|
53053
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
53054
|
+
HttpClient::Preconditions.require_keys(opts, [:acs_url, :challenge_request], 'ThreedsTwoChallengeRequest')
|
53055
|
+
@acs_url = HttpClient::Preconditions.assert_class('acs_url', opts.delete(:acs_url), String)
|
53056
|
+
@challenge_request = HttpClient::Preconditions.assert_class('challenge_request', opts.delete(:challenge_request), String)
|
53057
|
+
@session_data = (x = opts.delete(:session_data); x.nil? ? nil : HttpClient::Preconditions.assert_class('session_data', x, String))
|
53058
|
+
end
|
53059
|
+
|
53060
|
+
def to_json
|
53061
|
+
JSON.dump(to_hash)
|
53062
|
+
end
|
53063
|
+
|
53064
|
+
def copy(incoming={})
|
53065
|
+
ThreedsTwoChallengeRequest.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
53066
|
+
end
|
53067
|
+
|
53068
|
+
def subtype_to_hash
|
53069
|
+
{
|
53070
|
+
:acs_url => acs_url,
|
53071
|
+
:challenge_request => challenge_request,
|
53072
|
+
:session_data => session_data
|
53073
|
+
}
|
53074
|
+
end
|
53075
|
+
|
53076
|
+
end
|
53077
|
+
|
53078
|
+
# Data that must be rendered by the 3DS Client in order to help the issuer ACS
|
53079
|
+
# silently identify the user. This format doesn't decompose the ACS identify
|
53080
|
+
# method.
|
53081
|
+
class ThreedsTwoMethod < ThreedsIdentifyAction
|
53082
|
+
|
53083
|
+
attr_reader :method
|
53084
|
+
|
53085
|
+
def initialize(incoming={})
|
53086
|
+
super(:discriminator => ThreedsIdentifyAction::Types::THREEDS_TWO_METHOD)
|
53087
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
53088
|
+
HttpClient::Preconditions.require_keys(opts, [:method], 'ThreedsTwoMethod')
|
53089
|
+
@method = HttpClient::Preconditions.assert_class('method', opts.delete(:method), String)
|
53090
|
+
end
|
53091
|
+
|
53092
|
+
def to_json
|
53093
|
+
JSON.dump(to_hash)
|
53094
|
+
end
|
53095
|
+
|
53096
|
+
def copy(incoming={})
|
53097
|
+
ThreedsTwoMethod.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
53098
|
+
end
|
53099
|
+
|
53100
|
+
def subtype_to_hash
|
53101
|
+
{
|
53102
|
+
:method => method
|
53103
|
+
}
|
53104
|
+
end
|
53105
|
+
|
53106
|
+
end
|
53107
|
+
|
52184
53108
|
# Service shipping tier available in this tier group. e.g. Standard tier,
|
52185
53109
|
# Express tier, Economy tier
|
52186
53110
|
class Tier
|
@@ -54685,7 +55609,7 @@ module Io
|
|
54685
55609
|
end
|
54686
55610
|
|
54687
55611
|
def Helper.to_big_decimal(value)
|
54688
|
-
value ? BigDecimal
|
55612
|
+
value ? BigDecimal(value.to_s) : nil
|
54689
55613
|
end
|
54690
55614
|
|
54691
55615
|
def Helper.to_object(value)
|