flowcommerce 0.2.47 → 0.2.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/flow_commerce/flow_api_v0_client.rb +654 -154
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6378e423e29c4c93f618e820b8330f9c7854cddd
|
4
|
+
data.tar.gz: f69956f506e0cdefc9a96ba14b4c3a78b4a043f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8297ddd2da4a5da01e12ac12f009b0104ea244247228e6f7c56572a344a5d03f0f58049dd169f64ad2e61ae555446b2f3f4550f4eba6439b0679be5419de6e3e
|
7
|
+
data.tar.gz: 79f676845cfe3cbcc104e23dac41dbf205904794474ba1c70cbac544ea7fd7003ef79739a9d92ba8f96cdf5bdfdf6e1590dcdac4f9619a797990165cf0bbfa07
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# Generated by API Builder - https://www.apibuilder.io
|
2
2
|
# Service version: 0.4.11
|
3
|
-
# apibuilder:0.12.87 https://app.apibuilder.io/flow/api/0.4.
|
3
|
+
# apibuilder:0.12.87 https://app.apibuilder.io/flow/api/0.4.28/ruby_client
|
4
4
|
|
5
5
|
require 'cgi'
|
6
6
|
require 'net/http'
|
@@ -25,7 +25,7 @@ module Io
|
|
25
25
|
|
26
26
|
BASE_URL = 'https://api.flow.io' unless defined?(Constants::BASE_URL)
|
27
27
|
NAMESPACE = 'io.flow.v0' unless defined?(Constants::NAMESPACE)
|
28
|
-
USER_AGENT = 'apibuilder:0.12.87 https://app.apibuilder.io/flow/api/0.4.
|
28
|
+
USER_AGENT = 'apibuilder:0.12.87 https://app.apibuilder.io/flow/api/0.4.28/ruby_client' unless defined?(Constants::USER_AGENT)
|
29
29
|
VERSION = '0.4.11' unless defined?(Constants::VERSION)
|
30
30
|
VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
|
31
31
|
|
@@ -340,6 +340,10 @@ module Io
|
|
340
340
|
@feeds ||= ::Io::Flow::V0::Clients::Feeds.new(self)
|
341
341
|
end
|
342
342
|
|
343
|
+
def fulfillments
|
344
|
+
@fulfillments ||= ::Io::Flow::V0::Clients::Fulfillments.new(self)
|
345
|
+
end
|
346
|
+
|
343
347
|
def healthchecks
|
344
348
|
@healthchecks ||= ::Io::Flow::V0::Clients::Healthchecks.new(self)
|
345
349
|
end
|
@@ -604,15 +608,15 @@ module Io
|
|
604
608
|
::Io::Flow::V0::Models::CreditPayment.new(r)
|
605
609
|
end
|
606
610
|
|
607
|
-
def put_by_key(organization, key,
|
611
|
+
def put_by_key(organization, key, credit_payment_form, incoming={})
|
608
612
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
609
613
|
HttpClient::Preconditions.assert_class('key', key, String)
|
610
614
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
611
615
|
query = {
|
612
616
|
:expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
|
613
617
|
}.delete_if { |k, v| v.nil? }
|
614
|
-
(x =
|
615
|
-
r = @client.request("/#{CGI.escape(organization)}/credit/payments/#{CGI.escape(key)}").with_query(query).with_json(
|
618
|
+
(x = credit_payment_form; x.is_a?(::Io::Flow::V0::Models::CreditPaymentForm) ? x : ::Io::Flow::V0::Models::CreditPaymentForm.new(x))
|
619
|
+
r = @client.request("/#{CGI.escape(organization)}/credit/payments/#{CGI.escape(key)}").with_query(query).with_json(credit_payment_form.to_json).put
|
616
620
|
::Io::Flow::V0::Models::CreditPayment.new(r)
|
617
621
|
end
|
618
622
|
|
@@ -753,6 +757,8 @@ module Io
|
|
753
757
|
query = {
|
754
758
|
: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 }),
|
755
759
|
:tags => (x = opts.delete(:tags); x.nil? ? nil : HttpClient::Preconditions.assert_class('tags', x, Array).map { |v| HttpClient::Preconditions.assert_class('tags', v, String) }),
|
760
|
+
:amount => (x = opts.delete(:amount); x.nil? ? nil : HttpClient::Preconditions.assert_class('amount', x, String)),
|
761
|
+
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
|
756
762
|
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
757
763
|
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
758
764
|
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "display_position" : x), String)
|
@@ -831,6 +837,15 @@ module Io
|
|
831
837
|
r.map { |x| ::Io::Flow::V0::Models::Promotion.from_json(x) }
|
832
838
|
end
|
833
839
|
|
840
|
+
# Updates the status of a given experience.
|
841
|
+
def put_status_by_key(organization, key, experience_status_form)
|
842
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
843
|
+
HttpClient::Preconditions.assert_class('key', key, String)
|
844
|
+
(x = experience_status_form; x.is_a?(::Io::Flow::V0::Models::ExperienceStatusForm) ? x : ::Io::Flow::V0::Models::ExperienceStatusForm.new(x))
|
845
|
+
r = @client.request("/#{CGI.escape(organization)}/experiences/#{CGI.escape(key)}/status").with_json(experience_status_form.to_json).put
|
846
|
+
::Io::Flow::V0::Models::Experience.new(r)
|
847
|
+
end
|
848
|
+
|
834
849
|
# Formats the requested amount using the formatting settings for the
|
835
850
|
# experience.
|
836
851
|
def get_conversions_by_base_and_amount(organization, base, amount, incoming={})
|
@@ -1098,11 +1113,13 @@ module Io
|
|
1098
1113
|
::Io::Flow::V0::Models::Authorization.from_json(r)
|
1099
1114
|
end
|
1100
1115
|
|
1101
|
-
|
1116
|
+
# Creates an installment plan for this order, automatically associating to
|
1117
|
+
# this order.
|
1118
|
+
def post_installment_and_plan_and_authorizations_by_number(organization, number, installment_plan_payment_form)
|
1102
1119
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1103
1120
|
HttpClient::Preconditions.assert_class('number', number, String)
|
1104
|
-
(x =
|
1105
|
-
r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}/
|
1121
|
+
(x = installment_plan_payment_form; x.is_a?(::Io::Flow::V0::Models::InstallmentPlanPaymentForm) ? x : ::Io::Flow::V0::Models::InstallmentPlanPaymentForm.new(x))
|
1122
|
+
r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}/installment/plan/authorizations").with_json(installment_plan_payment_form.to_json).post
|
1106
1123
|
::Io::Flow::V0::Models::Order.new(r)
|
1107
1124
|
end
|
1108
1125
|
|
@@ -1132,14 +1149,6 @@ module Io
|
|
1132
1149
|
::Io::Flow::V0::Models::Order.new(r)
|
1133
1150
|
end
|
1134
1151
|
|
1135
|
-
def put_updates_by_number(organization, number, order_update_form)
|
1136
|
-
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1137
|
-
HttpClient::Preconditions.assert_class('number', number, String)
|
1138
|
-
(x = order_update_form; x.is_a?(::Io::Flow::V0::Models::OrderUpdateForm) ? x : ::Io::Flow::V0::Models::OrderUpdateForm.new(x))
|
1139
|
-
r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}/updates").with_json(order_update_form.to_json).put
|
1140
|
-
::Io::Flow::V0::Models::Order.new(r)
|
1141
|
-
end
|
1142
|
-
|
1143
1152
|
# Returns information about a specific order using an identifier number
|
1144
1153
|
def get_identifier_by_identifier(organization, identifier, incoming={})
|
1145
1154
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
@@ -1456,7 +1465,7 @@ module Io
|
|
1456
1465
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1457
1466
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1458
1467
|
query = {
|
1459
|
-
:country => (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, String)),
|
1468
|
+
:country => (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, Array).map { |v| HttpClient::Preconditions.assert_class('country', v, String) }),
|
1460
1469
|
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
|
1461
1470
|
:experience => (x = opts.delete(:experience); x.nil? ? nil : HttpClient::Preconditions.assert_class('experience', x, String)),
|
1462
1471
|
:ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
|
@@ -1472,7 +1481,7 @@ module Io
|
|
1472
1481
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1473
1482
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
1474
1483
|
query = {
|
1475
|
-
:country => (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, String)),
|
1484
|
+
:country => (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, Array).map { |v| HttpClient::Preconditions.assert_class('country', v, String) }),
|
1476
1485
|
:currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
|
1477
1486
|
:experience => (x = opts.delete(:experience); x.nil? ? nil : HttpClient::Preconditions.assert_class('experience', x, String)),
|
1478
1487
|
:ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
|
@@ -4212,6 +4221,37 @@ module Io
|
|
4212
4221
|
|
4213
4222
|
end
|
4214
4223
|
|
4224
|
+
class Fulfillments
|
4225
|
+
|
4226
|
+
def initialize(client)
|
4227
|
+
@client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
|
4228
|
+
end
|
4229
|
+
|
4230
|
+
def get(organization, number)
|
4231
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
4232
|
+
HttpClient::Preconditions.assert_class('number', number, String)
|
4233
|
+
r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}/fulfillments").get
|
4234
|
+
::Io::Flow::V0::Models::Fulfillment.new(r)
|
4235
|
+
end
|
4236
|
+
|
4237
|
+
def put_cancellations(organization, number, fulfillment_cancellation_form)
|
4238
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
4239
|
+
HttpClient::Preconditions.assert_class('number', number, String)
|
4240
|
+
(x = fulfillment_cancellation_form; x.is_a?(::Io::Flow::V0::Models::FulfillmentCancellationForm) ? x : ::Io::Flow::V0::Models::FulfillmentCancellationForm.new(x))
|
4241
|
+
r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}/fulfillments/cancellations").with_json(fulfillment_cancellation_form.to_json).put
|
4242
|
+
::Io::Flow::V0::Models::Fulfillment.new(r)
|
4243
|
+
end
|
4244
|
+
|
4245
|
+
def put_complete_and_cancellations(organization, number, fulfillment_complete_cancellation_form)
|
4246
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
4247
|
+
HttpClient::Preconditions.assert_class('number', number, String)
|
4248
|
+
(x = fulfillment_complete_cancellation_form; x.is_a?(::Io::Flow::V0::Models::FulfillmentCompleteCancellationForm) ? x : ::Io::Flow::V0::Models::FulfillmentCompleteCancellationForm.new(x))
|
4249
|
+
r = @client.request("/#{CGI.escape(organization)}/orders/#{CGI.escape(number)}/fulfillments/complete/cancellations").with_json(fulfillment_complete_cancellation_form.to_json).put
|
4250
|
+
::Io::Flow::V0::Models::Fulfillment.new(r)
|
4251
|
+
end
|
4252
|
+
|
4253
|
+
end
|
4254
|
+
|
4215
4255
|
class Healthchecks
|
4216
4256
|
|
4217
4257
|
def initialize(client)
|
@@ -7833,6 +7873,61 @@ module Io
|
|
7833
7873
|
|
7834
7874
|
end
|
7835
7875
|
|
7876
|
+
class CancelReason
|
7877
|
+
|
7878
|
+
attr_reader :value
|
7879
|
+
|
7880
|
+
def initialize(value)
|
7881
|
+
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
7882
|
+
end
|
7883
|
+
|
7884
|
+
# Returns the instance of CancelReason for this value, creating a new instance for an unknown value
|
7885
|
+
def CancelReason.apply(value)
|
7886
|
+
if value.instance_of?(CancelReason)
|
7887
|
+
value
|
7888
|
+
else
|
7889
|
+
HttpClient::Preconditions.assert_class_or_nil('value', value, String)
|
7890
|
+
value.nil? ? nil : (from_string(value) || CancelReason.new(value))
|
7891
|
+
end
|
7892
|
+
end
|
7893
|
+
|
7894
|
+
# Returns the instance of CancelReason for this value, or nil if not found
|
7895
|
+
def CancelReason.from_string(value)
|
7896
|
+
HttpClient::Preconditions.assert_class('value', value, String)
|
7897
|
+
CancelReason.ALL.find { |v| v.value == value }
|
7898
|
+
end
|
7899
|
+
|
7900
|
+
def CancelReason.ALL
|
7901
|
+
@@all ||= [CancelReason.out_of_stock, CancelReason.consumer_requested, CancelReason.flow_cancel]
|
7902
|
+
end
|
7903
|
+
|
7904
|
+
# Out of stock is a permanent cancel of the fulfillment of an item qty. If no
|
7905
|
+
# other fulfillment parties exist, this will cancel the ordered quantity and
|
7906
|
+
# reduce or refund the consumer's payment.
|
7907
|
+
def CancelReason.out_of_stock
|
7908
|
+
@@_out_of_stock ||= CancelReason.new('out_of_stock')
|
7909
|
+
end
|
7910
|
+
|
7911
|
+
# A consumer requested cancellation of an item qty and the fulfillment party has
|
7912
|
+
# acknowledged that the qty will not be shipped. This is a cancel of the ordered
|
7913
|
+
# quantity and will reduce or refund the consumer's payment
|
7914
|
+
def CancelReason.consumer_requested
|
7915
|
+
@@_consumer_requested ||= CancelReason.new('consumer_requested')
|
7916
|
+
end
|
7917
|
+
|
7918
|
+
# Flow has had to cancel an order, possibly due to fraud activity or inability
|
7919
|
+
# to collect payment. This will cancel the ordered quantity. All known parties
|
7920
|
+
# will be notified.
|
7921
|
+
def CancelReason.flow_cancel
|
7922
|
+
@@_flow_cancel ||= CancelReason.new('flow_cancel')
|
7923
|
+
end
|
7924
|
+
|
7925
|
+
def to_hash
|
7926
|
+
value
|
7927
|
+
end
|
7928
|
+
|
7929
|
+
end
|
7930
|
+
|
7836
7931
|
class Capability
|
7837
7932
|
|
7838
7933
|
attr_reader :value
|
@@ -8903,6 +8998,52 @@ module Io
|
|
8903
8998
|
|
8904
8999
|
end
|
8905
9000
|
|
9001
|
+
class ExperienceStatus
|
9002
|
+
|
9003
|
+
attr_reader :value
|
9004
|
+
|
9005
|
+
def initialize(value)
|
9006
|
+
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
9007
|
+
end
|
9008
|
+
|
9009
|
+
# Returns the instance of ExperienceStatus for this value, creating a new instance for an unknown value
|
9010
|
+
def ExperienceStatus.apply(value)
|
9011
|
+
if value.instance_of?(ExperienceStatus)
|
9012
|
+
value
|
9013
|
+
else
|
9014
|
+
HttpClient::Preconditions.assert_class_or_nil('value', value, String)
|
9015
|
+
value.nil? ? nil : (from_string(value) || ExperienceStatus.new(value))
|
9016
|
+
end
|
9017
|
+
end
|
9018
|
+
|
9019
|
+
# Returns the instance of ExperienceStatus for this value, or nil if not found
|
9020
|
+
def ExperienceStatus.from_string(value)
|
9021
|
+
HttpClient::Preconditions.assert_class('value', value, String)
|
9022
|
+
ExperienceStatus.ALL.find { |v| v.value == value }
|
9023
|
+
end
|
9024
|
+
|
9025
|
+
def ExperienceStatus.ALL
|
9026
|
+
@@all ||= [ExperienceStatus.draft, ExperienceStatus.active, ExperienceStatus.archived]
|
9027
|
+
end
|
9028
|
+
|
9029
|
+
def ExperienceStatus.draft
|
9030
|
+
@@_draft ||= ExperienceStatus.new('draft')
|
9031
|
+
end
|
9032
|
+
|
9033
|
+
def ExperienceStatus.active
|
9034
|
+
@@_active ||= ExperienceStatus.new('active')
|
9035
|
+
end
|
9036
|
+
|
9037
|
+
def ExperienceStatus.archived
|
9038
|
+
@@_archived ||= ExperienceStatus.new('archived')
|
9039
|
+
end
|
9040
|
+
|
9041
|
+
def to_hash
|
9042
|
+
value
|
9043
|
+
end
|
9044
|
+
|
9045
|
+
end
|
9046
|
+
|
8906
9047
|
class ExportStatus
|
8907
9048
|
|
8908
9049
|
attr_reader :value
|
@@ -9051,6 +9192,55 @@ module Io
|
|
9051
9192
|
|
9052
9193
|
end
|
9053
9194
|
|
9195
|
+
class FulfillmentItemQuantityStatus
|
9196
|
+
|
9197
|
+
attr_reader :value
|
9198
|
+
|
9199
|
+
def initialize(value)
|
9200
|
+
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
9201
|
+
end
|
9202
|
+
|
9203
|
+
# Returns the instance of FulfillmentItemQuantityStatus for this value, creating a new instance for an unknown value
|
9204
|
+
def FulfillmentItemQuantityStatus.apply(value)
|
9205
|
+
if value.instance_of?(FulfillmentItemQuantityStatus)
|
9206
|
+
value
|
9207
|
+
else
|
9208
|
+
HttpClient::Preconditions.assert_class_or_nil('value', value, String)
|
9209
|
+
value.nil? ? nil : (from_string(value) || FulfillmentItemQuantityStatus.new(value))
|
9210
|
+
end
|
9211
|
+
end
|
9212
|
+
|
9213
|
+
# Returns the instance of FulfillmentItemQuantityStatus for this value, or nil if not found
|
9214
|
+
def FulfillmentItemQuantityStatus.from_string(value)
|
9215
|
+
HttpClient::Preconditions.assert_class('value', value, String)
|
9216
|
+
FulfillmentItemQuantityStatus.ALL.find { |v| v.value == value }
|
9217
|
+
end
|
9218
|
+
|
9219
|
+
def FulfillmentItemQuantityStatus.ALL
|
9220
|
+
@@all ||= [FulfillmentItemQuantityStatus.new, FulfillmentItemQuantityStatus.shipped, FulfillmentItemQuantityStatus.cancelled]
|
9221
|
+
end
|
9222
|
+
|
9223
|
+
# Item may be shipped or cancelled
|
9224
|
+
def FulfillmentItemQuantityStatus.new
|
9225
|
+
@@_new ||= FulfillmentItemQuantityStatus.new('new')
|
9226
|
+
end
|
9227
|
+
|
9228
|
+
# Item has been packaged for shipment; can no longer be cancelled.
|
9229
|
+
def FulfillmentItemQuantityStatus.shipped
|
9230
|
+
@@_shipped ||= FulfillmentItemQuantityStatus.new('shipped')
|
9231
|
+
end
|
9232
|
+
|
9233
|
+
# Item will not be fulfilled.
|
9234
|
+
def FulfillmentItemQuantityStatus.cancelled
|
9235
|
+
@@_cancelled ||= FulfillmentItemQuantityStatus.new('cancelled')
|
9236
|
+
end
|
9237
|
+
|
9238
|
+
def to_hash
|
9239
|
+
value
|
9240
|
+
end
|
9241
|
+
|
9242
|
+
end
|
9243
|
+
|
9054
9244
|
class FulfillmentMethodType
|
9055
9245
|
|
9056
9246
|
attr_reader :value
|
@@ -9412,6 +9602,56 @@ module Io
|
|
9412
9602
|
|
9413
9603
|
end
|
9414
9604
|
|
9605
|
+
class InstallmentPlanPaymentErrorCode
|
9606
|
+
|
9607
|
+
attr_reader :value
|
9608
|
+
|
9609
|
+
def initialize(value)
|
9610
|
+
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
9611
|
+
end
|
9612
|
+
|
9613
|
+
# Returns the instance of InstallmentPlanPaymentErrorCode for this value, creating a new instance for an unknown value
|
9614
|
+
def InstallmentPlanPaymentErrorCode.apply(value)
|
9615
|
+
if value.instance_of?(InstallmentPlanPaymentErrorCode)
|
9616
|
+
value
|
9617
|
+
else
|
9618
|
+
HttpClient::Preconditions.assert_class_or_nil('value', value, String)
|
9619
|
+
value.nil? ? nil : (from_string(value) || InstallmentPlanPaymentErrorCode.new(value))
|
9620
|
+
end
|
9621
|
+
end
|
9622
|
+
|
9623
|
+
# Returns the instance of InstallmentPlanPaymentErrorCode for this value, or nil if not found
|
9624
|
+
def InstallmentPlanPaymentErrorCode.from_string(value)
|
9625
|
+
HttpClient::Preconditions.assert_class('value', value, String)
|
9626
|
+
InstallmentPlanPaymentErrorCode.ALL.find { |v| v.value == value }
|
9627
|
+
end
|
9628
|
+
|
9629
|
+
def InstallmentPlanPaymentErrorCode.ALL
|
9630
|
+
@@all ||= [InstallmentPlanPaymentErrorCode.invalid_authorization, InstallmentPlanPaymentErrorCode.invalid_authorization_amount, InstallmentPlanPaymentErrorCode.invalid_installment_plan]
|
9631
|
+
end
|
9632
|
+
|
9633
|
+
# Indicates the specified authorization key does not exist
|
9634
|
+
def InstallmentPlanPaymentErrorCode.invalid_authorization
|
9635
|
+
@@_invalid_authorization ||= InstallmentPlanPaymentErrorCode.new('invalid_authorization')
|
9636
|
+
end
|
9637
|
+
|
9638
|
+
# Indicates the specified authorization amount does not match the first
|
9639
|
+
# installment in the plan
|
9640
|
+
def InstallmentPlanPaymentErrorCode.invalid_authorization_amount
|
9641
|
+
@@_invalid_authorization_amount ||= InstallmentPlanPaymentErrorCode.new('invalid_authorization_amount')
|
9642
|
+
end
|
9643
|
+
|
9644
|
+
# Indicates the specified installment plan does not exist
|
9645
|
+
def InstallmentPlanPaymentErrorCode.invalid_installment_plan
|
9646
|
+
@@_invalid_installment_plan ||= InstallmentPlanPaymentErrorCode.new('invalid_installment_plan')
|
9647
|
+
end
|
9648
|
+
|
9649
|
+
def to_hash
|
9650
|
+
value
|
9651
|
+
end
|
9652
|
+
|
9653
|
+
end
|
9654
|
+
|
9415
9655
|
class InvitationErrorCode
|
9416
9656
|
|
9417
9657
|
attr_reader :value
|
@@ -9681,6 +9921,65 @@ module Io
|
|
9681
9921
|
|
9682
9922
|
end
|
9683
9923
|
|
9924
|
+
class OrderChangeSource
|
9925
|
+
|
9926
|
+
attr_reader :value
|
9927
|
+
|
9928
|
+
def initialize(value)
|
9929
|
+
@value = HttpClient::Preconditions.assert_class('value', value, String)
|
9930
|
+
end
|
9931
|
+
|
9932
|
+
# Returns the instance of OrderChangeSource for this value, creating a new instance for an unknown value
|
9933
|
+
def OrderChangeSource.apply(value)
|
9934
|
+
if value.instance_of?(OrderChangeSource)
|
9935
|
+
value
|
9936
|
+
else
|
9937
|
+
HttpClient::Preconditions.assert_class_or_nil('value', value, String)
|
9938
|
+
value.nil? ? nil : (from_string(value) || OrderChangeSource.new(value))
|
9939
|
+
end
|
9940
|
+
end
|
9941
|
+
|
9942
|
+
# Returns the instance of OrderChangeSource for this value, or nil if not found
|
9943
|
+
def OrderChangeSource.from_string(value)
|
9944
|
+
HttpClient::Preconditions.assert_class('value', value, String)
|
9945
|
+
OrderChangeSource.ALL.find { |v| v.value == value }
|
9946
|
+
end
|
9947
|
+
|
9948
|
+
def OrderChangeSource.ALL
|
9949
|
+
@@all ||= [OrderChangeSource.consumer, OrderChangeSource.retailer, OrderChangeSource.fulfillment, OrderChangeSource.flow, OrderChangeSource.carrier]
|
9950
|
+
end
|
9951
|
+
|
9952
|
+
# The party that placed an order
|
9953
|
+
def OrderChangeSource.consumer
|
9954
|
+
@@_consumer ||= OrderChangeSource.new('consumer')
|
9955
|
+
end
|
9956
|
+
|
9957
|
+
# The party that owns the processing of the order
|
9958
|
+
def OrderChangeSource.retailer
|
9959
|
+
@@_retailer ||= OrderChangeSource.new('retailer')
|
9960
|
+
end
|
9961
|
+
|
9962
|
+
# A party providing fulfillment for an order
|
9963
|
+
def OrderChangeSource.fulfillment
|
9964
|
+
@@_fulfillment ||= OrderChangeSource.new('fulfillment')
|
9965
|
+
end
|
9966
|
+
|
9967
|
+
# Flow may provide anti-fraud or payment services for an order
|
9968
|
+
def OrderChangeSource.flow
|
9969
|
+
@@_flow ||= OrderChangeSource.new('flow')
|
9970
|
+
end
|
9971
|
+
|
9972
|
+
# A party providing carriage for an order
|
9973
|
+
def OrderChangeSource.carrier
|
9974
|
+
@@_carrier ||= OrderChangeSource.new('carrier')
|
9975
|
+
end
|
9976
|
+
|
9977
|
+
def to_hash
|
9978
|
+
value
|
9979
|
+
end
|
9980
|
+
|
9981
|
+
end
|
9982
|
+
|
9684
9983
|
class OrderErrorCode
|
9685
9984
|
|
9686
9985
|
attr_reader :value
|
@@ -9778,7 +10077,7 @@ module Io
|
|
9778
10077
|
end
|
9779
10078
|
|
9780
10079
|
def OrderPaymentType.ALL
|
9781
|
-
@@all ||= [OrderPaymentType.card, OrderPaymentType.online, OrderPaymentType.credit, OrderPaymentType.cash_on_delivery]
|
10080
|
+
@@all ||= [OrderPaymentType.card, OrderPaymentType.online, OrderPaymentType.credit, OrderPaymentType.installment_plan, OrderPaymentType.cash_on_delivery]
|
9782
10081
|
end
|
9783
10082
|
|
9784
10083
|
# Represents a payment in the form of a credit or debit card
|
@@ -9797,6 +10096,14 @@ module Io
|
|
9797
10096
|
@@_credit ||= OrderPaymentType.new('credit')
|
9798
10097
|
end
|
9799
10098
|
|
10099
|
+
# An installment plan payment represents that the user has elected an
|
10100
|
+
# installment plan to pay for this order. For the purposes of the order, the
|
10101
|
+
# balance will reflect fully paid for the total value of the installment plan,
|
10102
|
+
# even though individual installments may be created in the future.
|
10103
|
+
def OrderPaymentType.installment_plan
|
10104
|
+
@@_installment_plan ||= OrderPaymentType.new('installment_plan')
|
10105
|
+
end
|
10106
|
+
|
9800
10107
|
# Request to pay the balance with cash on delivery. Offered only when the final
|
9801
10108
|
# mile carriers support cash on delivery.
|
9802
10109
|
def OrderPaymentType.cash_on_delivery
|
@@ -15184,13 +15491,12 @@ module Io
|
|
15184
15491
|
|
15185
15492
|
class CreditPaymentForm
|
15186
15493
|
|
15187
|
-
attr_reader :order_number, :
|
15494
|
+
attr_reader :order_number, :description, :amount, :max, :currency, :attributes
|
15188
15495
|
|
15189
15496
|
def initialize(incoming={})
|
15190
15497
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
15191
15498
|
HttpClient::Preconditions.require_keys(opts, [:order_number, :description, :amount, :max, :currency], 'CreditPaymentForm')
|
15192
15499
|
@order_number = HttpClient::Preconditions.assert_class('order_number', opts.delete(:order_number), String)
|
15193
|
-
@key = (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, String))
|
15194
15500
|
@description = HttpClient::Preconditions.assert_class('description', opts.delete(:description), String)
|
15195
15501
|
@amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal)
|
15196
15502
|
@max = HttpClient::Preconditions.assert_class('max', HttpClient::Helper.to_big_decimal(opts.delete(:max)), BigDecimal)
|
@@ -15209,7 +15515,6 @@ module Io
|
|
15209
15515
|
def to_hash
|
15210
15516
|
{
|
15211
15517
|
:order_number => order_number,
|
15212
|
-
:key => key,
|
15213
15518
|
:description => description,
|
15214
15519
|
:amount => amount,
|
15215
15520
|
:max => max,
|
@@ -15220,42 +15525,6 @@ module Io
|
|
15220
15525
|
|
15221
15526
|
end
|
15222
15527
|
|
15223
|
-
class CreditPaymentPutForm
|
15224
|
-
|
15225
|
-
attr_reader :order_number, :description, :amount, :currency, :max, :attributes
|
15226
|
-
|
15227
|
-
def initialize(incoming={})
|
15228
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
15229
|
-
HttpClient::Preconditions.require_keys(opts, [:order_number, :description, :amount, :currency, :max], 'CreditPaymentPutForm')
|
15230
|
-
@order_number = HttpClient::Preconditions.assert_class('order_number', opts.delete(:order_number), String)
|
15231
|
-
@description = HttpClient::Preconditions.assert_class('description', opts.delete(:description), String)
|
15232
|
-
@amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal)
|
15233
|
-
@currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
|
15234
|
-
@max = HttpClient::Preconditions.assert_class('max', HttpClient::Helper.to_big_decimal(opts.delete(:max)), BigDecimal)
|
15235
|
-
@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 })
|
15236
|
-
end
|
15237
|
-
|
15238
|
-
def to_json
|
15239
|
-
JSON.dump(to_hash)
|
15240
|
-
end
|
15241
|
-
|
15242
|
-
def copy(incoming={})
|
15243
|
-
CreditPaymentPutForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
15244
|
-
end
|
15245
|
-
|
15246
|
-
def to_hash
|
15247
|
-
{
|
15248
|
-
:order_number => order_number,
|
15249
|
-
:description => description,
|
15250
|
-
:amount => amount,
|
15251
|
-
:currency => currency,
|
15252
|
-
:max => max,
|
15253
|
-
:attributes => attributes.nil? ? nil : attributes
|
15254
|
-
}
|
15255
|
-
end
|
15256
|
-
|
15257
|
-
end
|
15258
|
-
|
15259
15528
|
class CreditPaymentVersion
|
15260
15529
|
|
15261
15530
|
attr_reader :id, :timestamp, :type, :credit_payment
|
@@ -16103,7 +16372,7 @@ module Io
|
|
16103
16372
|
# Experiences define a local experience for a given geographic region
|
16104
16373
|
class Experience < ExpandableExperience
|
16105
16374
|
|
16106
|
-
attr_reader :id, :key, :name, :delivered_duty, :region, :country, :currency, :language, :measurement_system, :subcatalog, :position, :settings
|
16375
|
+
attr_reader :id, :key, :name, :delivered_duty, :region, :country, :currency, :language, :measurement_system, :subcatalog, :position, :settings, :status
|
16107
16376
|
|
16108
16377
|
def initialize(incoming={})
|
16109
16378
|
super(:discriminator => ExpandableExperience::Types::EXPERIENCE)
|
@@ -16121,6 +16390,7 @@ module Io
|
|
16121
16390
|
@subcatalog = (x = opts.delete(:subcatalog); x.is_a?(::Io::Flow::V0::Models::SubcatalogReference) ? x : ::Io::Flow::V0::Models::SubcatalogReference.new(x))
|
16122
16391
|
@position = HttpClient::Preconditions.assert_class('position', opts.delete(:position), Integer)
|
16123
16392
|
@settings = (x = opts.delete(:settings); x.is_a?(::Io::Flow::V0::Models::ExperienceSettings) ? x : ::Io::Flow::V0::Models::ExperienceSettings.new(x))
|
16393
|
+
@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)))
|
16124
16394
|
end
|
16125
16395
|
|
16126
16396
|
def to_json
|
@@ -16144,7 +16414,8 @@ module Io
|
|
16144
16414
|
:measurement_system => measurement_system.value,
|
16145
16415
|
:subcatalog => subcatalog.to_hash,
|
16146
16416
|
:position => position,
|
16147
|
-
:settings => settings.to_hash
|
16417
|
+
:settings => settings.to_hash,
|
16418
|
+
:status => status.nil? ? nil : status.value
|
16148
16419
|
}
|
16149
16420
|
end
|
16150
16421
|
|
@@ -16419,6 +16690,34 @@ module Io
|
|
16419
16690
|
|
16420
16691
|
end
|
16421
16692
|
|
16693
|
+
# The experience status form is used to update the status of a particular
|
16694
|
+
# experience.
|
16695
|
+
class ExperienceStatusForm
|
16696
|
+
|
16697
|
+
attr_reader :status
|
16698
|
+
|
16699
|
+
def initialize(incoming={})
|
16700
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
16701
|
+
HttpClient::Preconditions.require_keys(opts, [:status], 'ExperienceStatusForm')
|
16702
|
+
@status = (x = opts.delete(:status); x.is_a?(::Io::Flow::V0::Models::ExperienceStatus) ? x : ::Io::Flow::V0::Models::ExperienceStatus.apply(x))
|
16703
|
+
end
|
16704
|
+
|
16705
|
+
def to_json
|
16706
|
+
JSON.dump(to_hash)
|
16707
|
+
end
|
16708
|
+
|
16709
|
+
def copy(incoming={})
|
16710
|
+
ExperienceStatusForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
16711
|
+
end
|
16712
|
+
|
16713
|
+
def to_hash
|
16714
|
+
{
|
16715
|
+
:status => status.value
|
16716
|
+
}
|
16717
|
+
end
|
16718
|
+
|
16719
|
+
end
|
16720
|
+
|
16422
16721
|
# Some important fields related to experiences used in various APIs
|
16423
16722
|
class ExperienceSummary
|
16424
16723
|
|
@@ -16910,17 +17209,113 @@ module Io
|
|
16910
17209
|
|
16911
17210
|
end
|
16912
17211
|
|
16913
|
-
|
17212
|
+
# Used to track and manage the fulfillment of an order.
|
17213
|
+
class Fulfillment
|
16914
17214
|
|
16915
|
-
attr_reader :
|
17215
|
+
attr_reader :organization, :key, :number, :items, :center
|
16916
17216
|
|
16917
17217
|
def initialize(incoming={})
|
16918
17218
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
16919
|
-
HttpClient::Preconditions.require_keys(opts, [:
|
16920
|
-
@
|
16921
|
-
@
|
16922
|
-
|
16923
|
-
|
17219
|
+
HttpClient::Preconditions.require_keys(opts, [:organization, :key, :number, :items], 'Fulfillment')
|
17220
|
+
@organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
|
17221
|
+
@key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
|
17222
|
+
@number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
|
17223
|
+
@items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FulfillmentItem) ? x : ::Io::Flow::V0::Models::FulfillmentItem.new(x)) }
|
17224
|
+
@center = (x = opts.delete(:center); x.nil? ? nil : HttpClient::Preconditions.assert_class('center', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::CenterSummary) ? x : ::Io::Flow::V0::Models::CenterSummary.new(x)) })
|
17225
|
+
end
|
17226
|
+
|
17227
|
+
def to_json
|
17228
|
+
JSON.dump(to_hash)
|
17229
|
+
end
|
17230
|
+
|
17231
|
+
def copy(incoming={})
|
17232
|
+
Fulfillment.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
17233
|
+
end
|
17234
|
+
|
17235
|
+
def to_hash
|
17236
|
+
{
|
17237
|
+
:organization => organization,
|
17238
|
+
:key => key,
|
17239
|
+
:number => number,
|
17240
|
+
:items => items.map { |o| o.to_hash },
|
17241
|
+
:center => center.nil? ? nil : center.map { |o| o.to_hash }
|
17242
|
+
}
|
17243
|
+
end
|
17244
|
+
|
17245
|
+
end
|
17246
|
+
|
17247
|
+
# Changing an order for the purpose of cancelling specific line quantities
|
17248
|
+
class FulfillmentCancellationForm
|
17249
|
+
|
17250
|
+
attr_reader :change_source, :reason, :lines
|
17251
|
+
|
17252
|
+
def initialize(incoming={})
|
17253
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
17254
|
+
HttpClient::Preconditions.require_keys(opts, [:change_source, :reason, :lines], 'FulfillmentCancellationForm')
|
17255
|
+
@change_source = (x = opts.delete(:change_source); x.is_a?(::Io::Flow::V0::Models::OrderChangeSource) ? x : ::Io::Flow::V0::Models::OrderChangeSource.apply(x))
|
17256
|
+
@reason = (x = opts.delete(:reason); x.is_a?(::Io::Flow::V0::Models::CancelReason) ? x : ::Io::Flow::V0::Models::CancelReason.apply(x))
|
17257
|
+
@lines = HttpClient::Preconditions.assert_class('lines', opts.delete(:lines), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FulfillmentLineCancelForm) ? x : ::Io::Flow::V0::Models::FulfillmentLineCancelForm.new(x)) }
|
17258
|
+
end
|
17259
|
+
|
17260
|
+
def to_json
|
17261
|
+
JSON.dump(to_hash)
|
17262
|
+
end
|
17263
|
+
|
17264
|
+
def copy(incoming={})
|
17265
|
+
FulfillmentCancellationForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
17266
|
+
end
|
17267
|
+
|
17268
|
+
def to_hash
|
17269
|
+
{
|
17270
|
+
:change_source => change_source.value,
|
17271
|
+
:reason => reason.value,
|
17272
|
+
:lines => lines.map { |o| o.to_hash }
|
17273
|
+
}
|
17274
|
+
end
|
17275
|
+
|
17276
|
+
end
|
17277
|
+
|
17278
|
+
# Changing an order for the purpose of completely cancelling all remaining
|
17279
|
+
# uncancelled, unshipped lines of an order.
|
17280
|
+
class FulfillmentCompleteCancellationForm
|
17281
|
+
|
17282
|
+
attr_reader :change_source, :reason
|
17283
|
+
|
17284
|
+
def initialize(incoming={})
|
17285
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
17286
|
+
HttpClient::Preconditions.require_keys(opts, [:change_source, :reason], 'FulfillmentCompleteCancellationForm')
|
17287
|
+
@change_source = (x = opts.delete(:change_source); x.is_a?(::Io::Flow::V0::Models::OrderChangeSource) ? x : ::Io::Flow::V0::Models::OrderChangeSource.apply(x))
|
17288
|
+
@reason = (x = opts.delete(:reason); x.is_a?(::Io::Flow::V0::Models::CancelReason) ? x : ::Io::Flow::V0::Models::CancelReason.apply(x))
|
17289
|
+
end
|
17290
|
+
|
17291
|
+
def to_json
|
17292
|
+
JSON.dump(to_hash)
|
17293
|
+
end
|
17294
|
+
|
17295
|
+
def copy(incoming={})
|
17296
|
+
FulfillmentCompleteCancellationForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
17297
|
+
end
|
17298
|
+
|
17299
|
+
def to_hash
|
17300
|
+
{
|
17301
|
+
:change_source => change_source.value,
|
17302
|
+
:reason => reason.value
|
17303
|
+
}
|
17304
|
+
end
|
17305
|
+
|
17306
|
+
end
|
17307
|
+
|
17308
|
+
class FulfillmentExperienceReference
|
17309
|
+
|
17310
|
+
attr_reader :id, :currency
|
17311
|
+
|
17312
|
+
def initialize(incoming={})
|
17313
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
17314
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :currency], 'FulfillmentExperienceReference')
|
17315
|
+
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
17316
|
+
@currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
|
17317
|
+
end
|
17318
|
+
|
16924
17319
|
def to_json
|
16925
17320
|
JSON.dump(to_hash)
|
16926
17321
|
end
|
@@ -16938,6 +17333,99 @@ module Io
|
|
16938
17333
|
|
16939
17334
|
end
|
16940
17335
|
|
17336
|
+
# Used to track and manage the fulfillment of quantities of a sku
|
17337
|
+
class FulfillmentItem
|
17338
|
+
|
17339
|
+
attr_reader :item_number, :line_number, :quantities, :warehouse_sku
|
17340
|
+
|
17341
|
+
def initialize(incoming={})
|
17342
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
17343
|
+
HttpClient::Preconditions.require_keys(opts, [:item_number, :line_number, :quantities], 'FulfillmentItem')
|
17344
|
+
@item_number = HttpClient::Preconditions.assert_class('item_number', opts.delete(:item_number), String)
|
17345
|
+
@line_number = HttpClient::Preconditions.assert_class('line_number', opts.delete(:line_number), Integer)
|
17346
|
+
@quantities = HttpClient::Preconditions.assert_class('quantities', opts.delete(:quantities), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::FulfillmentItemQuantity) ? x : ::Io::Flow::V0::Models::FulfillmentItemQuantity.new(x)) }
|
17347
|
+
@warehouse_sku = (x = opts.delete(:warehouse_sku); x.nil? ? nil : HttpClient::Preconditions.assert_class('warehouse_sku', x, String))
|
17348
|
+
end
|
17349
|
+
|
17350
|
+
def to_json
|
17351
|
+
JSON.dump(to_hash)
|
17352
|
+
end
|
17353
|
+
|
17354
|
+
def copy(incoming={})
|
17355
|
+
FulfillmentItem.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
17356
|
+
end
|
17357
|
+
|
17358
|
+
def to_hash
|
17359
|
+
{
|
17360
|
+
:item_number => item_number,
|
17361
|
+
:line_number => line_number,
|
17362
|
+
:quantities => quantities.map { |o| o.to_hash },
|
17363
|
+
:warehouse_sku => warehouse_sku
|
17364
|
+
}
|
17365
|
+
end
|
17366
|
+
|
17367
|
+
end
|
17368
|
+
|
17369
|
+
# Fulfillment status of item quantities
|
17370
|
+
class FulfillmentItemQuantity
|
17371
|
+
|
17372
|
+
attr_reader :status, :quantity
|
17373
|
+
|
17374
|
+
def initialize(incoming={})
|
17375
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
17376
|
+
HttpClient::Preconditions.require_keys(opts, [:status, :quantity], 'FulfillmentItemQuantity')
|
17377
|
+
@status = (x = opts.delete(:status); x.is_a?(::Io::Flow::V0::Models::FulfillmentItemQuantityStatus) ? x : ::Io::Flow::V0::Models::FulfillmentItemQuantityStatus.apply(x))
|
17378
|
+
@quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
|
17379
|
+
end
|
17380
|
+
|
17381
|
+
def to_json
|
17382
|
+
JSON.dump(to_hash)
|
17383
|
+
end
|
17384
|
+
|
17385
|
+
def copy(incoming={})
|
17386
|
+
FulfillmentItemQuantity.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
17387
|
+
end
|
17388
|
+
|
17389
|
+
def to_hash
|
17390
|
+
{
|
17391
|
+
:status => status.value,
|
17392
|
+
:quantity => quantity
|
17393
|
+
}
|
17394
|
+
end
|
17395
|
+
|
17396
|
+
end
|
17397
|
+
|
17398
|
+
# At least one of item_number, line_number are required. If you can, send both.
|
17399
|
+
class FulfillmentLineCancelForm
|
17400
|
+
|
17401
|
+
attr_reader :item_number, :line_number, :quantity
|
17402
|
+
|
17403
|
+
def initialize(incoming={})
|
17404
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
17405
|
+
HttpClient::Preconditions.require_keys(opts, [:quantity], 'FulfillmentLineCancelForm')
|
17406
|
+
@item_number = (x = opts.delete(:item_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('item_number', x, String))
|
17407
|
+
@line_number = (x = opts.delete(:line_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('line_number', x, String))
|
17408
|
+
@quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
|
17409
|
+
end
|
17410
|
+
|
17411
|
+
def to_json
|
17412
|
+
JSON.dump(to_hash)
|
17413
|
+
end
|
17414
|
+
|
17415
|
+
def copy(incoming={})
|
17416
|
+
FulfillmentLineCancelForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
17417
|
+
end
|
17418
|
+
|
17419
|
+
def to_hash
|
17420
|
+
{
|
17421
|
+
:item_number => item_number,
|
17422
|
+
:line_number => line_number,
|
17423
|
+
:quantity => quantity
|
17424
|
+
}
|
17425
|
+
end
|
17426
|
+
|
17427
|
+
end
|
17428
|
+
|
16941
17429
|
# Event indicating insertion or changes to the details of a fully harmonized
|
16942
17430
|
# item. Will be triggered upon any change to the item being harmonized, its
|
16943
17431
|
# duties or taxes. If two changes occur within minutes of each other, it is
|
@@ -18375,6 +18863,96 @@ module Io
|
|
18375
18863
|
|
18376
18864
|
end
|
18377
18865
|
|
18866
|
+
class InstallmentPlanPaymentError
|
18867
|
+
|
18868
|
+
attr_reader :code, :messages, :codes
|
18869
|
+
|
18870
|
+
def initialize(incoming={})
|
18871
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
18872
|
+
HttpClient::Preconditions.require_keys(opts, [:code, :messages, :codes], 'InstallmentPlanPaymentError')
|
18873
|
+
@code = (x = opts.delete(:code); x.is_a?(::Io::Flow::V0::Models::InstallmentPlanPaymentErrorCode) ? x : ::Io::Flow::V0::Models::InstallmentPlanPaymentErrorCode.apply(x))
|
18874
|
+
@messages = HttpClient::Preconditions.assert_class('messages', opts.delete(:messages), Array).map { |v| HttpClient::Preconditions.assert_class('messages', v, String) }
|
18875
|
+
@codes = HttpClient::Preconditions.assert_class('codes', opts.delete(:codes), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::InstallmentPlanPaymentErrorCode) ? x : ::Io::Flow::V0::Models::InstallmentPlanPaymentErrorCode.apply(x)) }
|
18876
|
+
end
|
18877
|
+
|
18878
|
+
def to_json
|
18879
|
+
JSON.dump(to_hash)
|
18880
|
+
end
|
18881
|
+
|
18882
|
+
def copy(incoming={})
|
18883
|
+
InstallmentPlanPaymentError.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
18884
|
+
end
|
18885
|
+
|
18886
|
+
def to_hash
|
18887
|
+
{
|
18888
|
+
:code => code.value,
|
18889
|
+
:messages => messages,
|
18890
|
+
:codes => codes.map { |o| o.value }
|
18891
|
+
}
|
18892
|
+
end
|
18893
|
+
|
18894
|
+
end
|
18895
|
+
|
18896
|
+
# The installment payment form is used to create an installment plan for an
|
18897
|
+
# order, associating the plan immediately with this order.
|
18898
|
+
class InstallmentPlanPaymentForm
|
18899
|
+
|
18900
|
+
attr_reader :installment_program_id, :authorization_key
|
18901
|
+
|
18902
|
+
def initialize(incoming={})
|
18903
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
18904
|
+
HttpClient::Preconditions.require_keys(opts, [:installment_program_id, :authorization_key], 'InstallmentPlanPaymentForm')
|
18905
|
+
@installment_program_id = HttpClient::Preconditions.assert_class('installment_program_id', opts.delete(:installment_program_id), String)
|
18906
|
+
@authorization_key = HttpClient::Preconditions.assert_class('authorization_key', opts.delete(:authorization_key), String)
|
18907
|
+
end
|
18908
|
+
|
18909
|
+
def to_json
|
18910
|
+
JSON.dump(to_hash)
|
18911
|
+
end
|
18912
|
+
|
18913
|
+
def copy(incoming={})
|
18914
|
+
InstallmentPlanPaymentForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
18915
|
+
end
|
18916
|
+
|
18917
|
+
def to_hash
|
18918
|
+
{
|
18919
|
+
:installment_program_id => installment_program_id,
|
18920
|
+
:authorization_key => authorization_key
|
18921
|
+
}
|
18922
|
+
end
|
18923
|
+
|
18924
|
+
end
|
18925
|
+
|
18926
|
+
class InstallmentProgramSummary
|
18927
|
+
|
18928
|
+
attr_reader :id, :name, :initial
|
18929
|
+
|
18930
|
+
def initialize(incoming={})
|
18931
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
18932
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :name, :initial], 'InstallmentProgramSummary')
|
18933
|
+
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
18934
|
+
@name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
|
18935
|
+
@initial = (x = opts.delete(:initial); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x))
|
18936
|
+
end
|
18937
|
+
|
18938
|
+
def to_json
|
18939
|
+
JSON.dump(to_hash)
|
18940
|
+
end
|
18941
|
+
|
18942
|
+
def copy(incoming={})
|
18943
|
+
InstallmentProgramSummary.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
18944
|
+
end
|
18945
|
+
|
18946
|
+
def to_hash
|
18947
|
+
{
|
18948
|
+
:id => id,
|
18949
|
+
:name => name,
|
18950
|
+
:initial => initial.to_hash
|
18951
|
+
}
|
18952
|
+
end
|
18953
|
+
|
18954
|
+
end
|
18955
|
+
|
18378
18956
|
# Enables backorders, setting an optional number of units that we allow for
|
18379
18957
|
# backorder. For example, a backorder w/ quantity 10 will enable selling until
|
18380
18958
|
# the actual inventory quantity is -10.
|
@@ -21636,33 +22214,6 @@ module Io
|
|
21636
22214
|
|
21637
22215
|
end
|
21638
22216
|
|
21639
|
-
# An order cancellation form will update all item quantities to 0. The
|
21640
|
-
# implementation is a convenience method that wraps an order_update_form
|
21641
|
-
class OrderCancellationForm
|
21642
|
-
|
21643
|
-
attr_reader :attributes
|
21644
|
-
|
21645
|
-
def initialize(incoming={})
|
21646
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
21647
|
-
@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 })
|
21648
|
-
end
|
21649
|
-
|
21650
|
-
def to_json
|
21651
|
-
JSON.dump(to_hash)
|
21652
|
-
end
|
21653
|
-
|
21654
|
-
def copy(incoming={})
|
21655
|
-
OrderCancellationForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
21656
|
-
end
|
21657
|
-
|
21658
|
-
def to_hash
|
21659
|
-
{
|
21660
|
-
:attributes => attributes.nil? ? nil : attributes
|
21661
|
-
}
|
21662
|
-
end
|
21663
|
-
|
21664
|
-
end
|
21665
|
-
|
21666
22217
|
class OrderDeleted < Event
|
21667
22218
|
|
21668
22219
|
attr_reader :event_id, :timestamp, :organization, :number
|
@@ -22185,34 +22736,6 @@ module Io
|
|
22185
22736
|
|
22186
22737
|
end
|
22187
22738
|
|
22188
|
-
class OrderLineUpdateForm
|
22189
|
-
|
22190
|
-
attr_reader :item_number, :quantity
|
22191
|
-
|
22192
|
-
def initialize(incoming={})
|
22193
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
22194
|
-
HttpClient::Preconditions.require_keys(opts, [:item_number, :quantity], 'OrderLineUpdateForm')
|
22195
|
-
@item_number = HttpClient::Preconditions.assert_class('item_number', opts.delete(:item_number), String)
|
22196
|
-
@quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
|
22197
|
-
end
|
22198
|
-
|
22199
|
-
def to_json
|
22200
|
-
JSON.dump(to_hash)
|
22201
|
-
end
|
22202
|
-
|
22203
|
-
def copy(incoming={})
|
22204
|
-
OrderLineUpdateForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
22205
|
-
end
|
22206
|
-
|
22207
|
-
def to_hash
|
22208
|
-
{
|
22209
|
-
:item_number => item_number,
|
22210
|
-
:quantity => quantity
|
22211
|
-
}
|
22212
|
-
end
|
22213
|
-
|
22214
|
-
end
|
22215
|
-
|
22216
22739
|
# An Order Payment represents an individual payment applied to an order. The
|
22217
22740
|
# type of the payment can be used to further lookup transaction level detail
|
22218
22741
|
class OrderPayment
|
@@ -22423,33 +22946,6 @@ module Io
|
|
22423
22946
|
|
22424
22947
|
end
|
22425
22948
|
|
22426
|
-
class OrderUpdateForm
|
22427
|
-
|
22428
|
-
attr_reader :lines, :attributes
|
22429
|
-
|
22430
|
-
def initialize(incoming={})
|
22431
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
22432
|
-
@lines = (x = opts.delete(:lines); x.nil? ? nil : HttpClient::Preconditions.assert_class('lines', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::OrderLineUpdateForm) ? x : ::Io::Flow::V0::Models::OrderLineUpdateForm.new(x)) })
|
22433
|
-
@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 })
|
22434
|
-
end
|
22435
|
-
|
22436
|
-
def to_json
|
22437
|
-
JSON.dump(to_hash)
|
22438
|
-
end
|
22439
|
-
|
22440
|
-
def copy(incoming={})
|
22441
|
-
OrderUpdateForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
22442
|
-
end
|
22443
|
-
|
22444
|
-
def to_hash
|
22445
|
-
{
|
22446
|
-
:lines => lines.nil? ? nil : lines.map { |o| o.to_hash },
|
22447
|
-
:attributes => attributes.nil? ? nil : attributes
|
22448
|
-
}
|
22449
|
-
end
|
22450
|
-
|
22451
|
-
end
|
22452
|
-
|
22453
22949
|
class OrderUpserted < Event
|
22454
22950
|
|
22455
22951
|
attr_reader :event_id, :timestamp, :organization, :number, :environment, :experience_id, :expires_at, :customer, :selections, :items, :destination, :deliveries, :prices, :payments, :discount, :delivered_duty, :total, :created_at, :updated_at, :submitted_at, :lines, :attributes
|
@@ -23835,16 +24331,17 @@ module Io
|
|
23835
24331
|
|
23836
24332
|
class PaymentMethodRule
|
23837
24333
|
|
23838
|
-
attr_reader :tags, :payment_method, :display_position, :content, :issuers
|
24334
|
+
attr_reader :tags, :payment_method, :display_position, :content, :issuers, :programs
|
23839
24335
|
|
23840
24336
|
def initialize(incoming={})
|
23841
24337
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
23842
|
-
HttpClient::Preconditions.require_keys(opts, [:tags, :payment_method, :display_position], 'PaymentMethodRule')
|
24338
|
+
HttpClient::Preconditions.require_keys(opts, [:tags, :payment_method, :display_position, :programs], 'PaymentMethodRule')
|
23843
24339
|
@tags = HttpClient::Preconditions.assert_class('tags', opts.delete(:tags), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::PaymentMethodTag) ? x : ::Io::Flow::V0::Models::PaymentMethodTag.from_json(x)) }
|
23844
24340
|
@payment_method = (x = opts.delete(:payment_method); x.is_a?(::Io::Flow::V0::Models::PaymentMethod) ? x : ::Io::Flow::V0::Models::PaymentMethod.new(x))
|
23845
24341
|
@display_position = HttpClient::Preconditions.assert_class('display_position', opts.delete(:display_position), Integer)
|
23846
24342
|
@content = (x = opts.delete(:content); x.nil? ? nil : HttpClient::Preconditions.assert_class('content', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::PaymentMethodRuleContent) ? x : ::Io::Flow::V0::Models::PaymentMethodRuleContent.new(x)) })
|
23847
24343
|
@issuers = (x = opts.delete(:issuers); x.nil? ? nil : HttpClient::Preconditions.assert_class('issuers', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::PaymentMethodIssuer) ? x : ::Io::Flow::V0::Models::PaymentMethodIssuer.new(x)) })
|
24344
|
+
@programs = HttpClient::Preconditions.assert_class('programs', opts.delete(:programs), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::InstallmentProgramSummary) ? x : ::Io::Flow::V0::Models::InstallmentProgramSummary.new(x)) }
|
23848
24345
|
end
|
23849
24346
|
|
23850
24347
|
def to_json
|
@@ -23861,7 +24358,8 @@ module Io
|
|
23861
24358
|
:payment_method => payment_method.to_hash,
|
23862
24359
|
:display_position => display_position,
|
23863
24360
|
:content => content.nil? ? nil : content.map { |o| o.to_hash },
|
23864
|
-
:issuers => issuers.nil? ? nil : issuers.map { |o| o.to_hash }
|
24361
|
+
:issuers => issuers.nil? ? nil : issuers.map { |o| o.to_hash },
|
24362
|
+
:programs => programs.map { |o| o.to_hash }
|
23865
24363
|
}
|
23866
24364
|
end
|
23867
24365
|
|
@@ -26883,7 +27381,7 @@ module Io
|
|
26883
27381
|
# shipper to transport a package from a given origin to destination
|
26884
27382
|
class ShippingLabel
|
26885
27383
|
|
26886
|
-
attr_reader :id, :direction, :attributes, :carrier_tracking_number, :carrier_tracking_number_url, :cost, :destination, :flow_tracking_number, :flow_tracking_number_url, :origin, :service, :window, :commercial_invoice, :zpl, :pdf, :png, :order
|
27384
|
+
attr_reader :id, :direction, :attributes, :carrier_tracking_number, :carrier_tracking_number_url, :cost, :destination, :flow_tracking_number, :flow_tracking_number_url, :origin, :service, :window, :commercial_invoice, :zpl, :pdf, :png, :order, :package
|
26887
27385
|
|
26888
27386
|
def initialize(incoming={})
|
26889
27387
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
@@ -26905,6 +27403,7 @@ module Io
|
|
26905
27403
|
@pdf = (x = opts.delete(:pdf); x.nil? ? nil : HttpClient::Preconditions.assert_class('pdf', x, String))
|
26906
27404
|
@png = (x = opts.delete(:png); x.nil? ? nil : HttpClient::Preconditions.assert_class('png', x, String))
|
26907
27405
|
@order = (x = opts.delete(:order); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::LabelOrderSummary) ? x : ::Io::Flow::V0::Models::LabelOrderSummary.new(x)))
|
27406
|
+
@package = (x = opts.delete(:package); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ShippingLabelPackage) ? x : ::Io::Flow::V0::Models::ShippingLabelPackage.new(x)))
|
26908
27407
|
end
|
26909
27408
|
|
26910
27409
|
def to_json
|
@@ -26933,7 +27432,8 @@ module Io
|
|
26933
27432
|
:zpl => zpl,
|
26934
27433
|
:pdf => pdf,
|
26935
27434
|
:png => png,
|
26936
|
-
:order => order.nil? ? nil : order.to_hash
|
27435
|
+
:order => order.nil? ? nil : order.to_hash,
|
27436
|
+
:package => package.nil? ? nil : package.to_hash
|
26937
27437
|
}
|
26938
27438
|
end
|
26939
27439
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flowcommerce
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.48
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Flow Commerce, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|