flowcommerce 0.2.61 → 0.2.62

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f9804a0a7d709ff9edd2b1afe29a94ef6d6dd0fd
4
- data.tar.gz: 51846636408fe4b70456d403c3705fe4da032fae
3
+ metadata.gz: 5468d844c3c5141d7c7f88ef8c3c6d61e9d8f0ae
4
+ data.tar.gz: ef05dd7a66b7e4db08f85216f0ee59da72472e80
5
5
  SHA512:
6
- metadata.gz: b3e96dc2004ab866260db395a2b3cb58f0762afd854b2c6f308053643f099900c27f9752e1f69d25ebfb83141b8461194fad811cd7bef4535d5c3c63d7d73977
7
- data.tar.gz: d474963311d2cb9a96396d422e5ee3cf99b5d2072968804fa4f11941620c4b5da8f3087f7617059abf7f53b930e9ae89ed65c8ecd32d43812c8abb4f8bf67f3e
6
+ metadata.gz: 504bae8450758d412c3bf19e7ae6a46e2d261eb34db05f873d81faaec18846284ee13bb0365143405cc2f7aaea0d4932cc084d4c00f98ed842a94af57f38e80a
7
+ data.tar.gz: 66e0e46eefc05689f9e7ca20863008c2dc0aaccce61d66a9c8221b1379c8dea6a21536a9835eb2e23cd7424582f6232afb084b278291e460a4fadc20fc961b63
@@ -1,6 +1,6 @@
1
1
  # Generated by API Builder - https://www.apibuilder.io
2
2
  # Service version: 0.5.32
3
- # apibuilder 0.14.3 app.apibuilder.io/flow/api/0.5.31/ruby_client
3
+ # apibuilder 0.14.3 app.apibuilder.io/flow/api/0.5.33/ruby_client
4
4
 
5
5
  require 'cgi'
6
6
  require 'net/http'
@@ -25,7 +25,7 @@ module Io
25
25
 
26
26
  BASE_URL = 'https://api.flow.io' unless defined?(Constants::BASE_URL)
27
27
  NAMESPACE = 'io.flow.v0' unless defined?(Constants::NAMESPACE)
28
- USER_AGENT = 'apibuilder 0.14.3 app.apibuilder.io/flow/api/0.5.31/ruby_client' unless defined?(Constants::USER_AGENT)
28
+ USER_AGENT = 'apibuilder 0.14.3 app.apibuilder.io/flow/api/0.5.33/ruby_client' unless defined?(Constants::USER_AGENT)
29
29
  VERSION = '0.5.32' unless defined?(Constants::VERSION)
30
30
  VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
31
31
 
@@ -264,10 +264,6 @@ module Io
264
264
  @quotes ||= ::Io::Flow::V0::Clients::Quotes.new(self)
265
265
  end
266
266
 
267
- def reservations
268
- @reservations ||= ::Io::Flow::V0::Clients::Reservations.new(self)
269
- end
270
-
271
267
  def returns
272
268
  @returns ||= ::Io::Flow::V0::Clients::Returns.new(self)
273
269
  end
@@ -3662,43 +3658,6 @@ module Io
3662
3658
 
3663
3659
  end
3664
3660
 
3665
- class Reservations
3666
-
3667
- def initialize(client)
3668
- @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
3669
- end
3670
-
3671
- def post(organization, reservation_form)
3672
- HttpClient::Preconditions.assert_class('organization', organization, String)
3673
- (x = reservation_form; x.is_a?(::Io::Flow::V0::Models::ReservationForm) ? x : ::Io::Flow::V0::Models::ReservationForm.new(x))
3674
- r = @client.request("/#{CGI.escape(organization)}/inventory/reservation").with_json(reservation_form.to_json).post
3675
- ::Io::Flow::V0::Models::Reservation.new(r)
3676
- end
3677
-
3678
- def get_by_key(organization, key)
3679
- HttpClient::Preconditions.assert_class('organization', organization, String)
3680
- HttpClient::Preconditions.assert_class('key', key, String)
3681
- r = @client.request("/#{CGI.escape(organization)}/inventory/reservation/#{CGI.escape(key)}").get
3682
- ::Io::Flow::V0::Models::Reservation.new(r)
3683
- end
3684
-
3685
- def put_by_key(organization, key, reservation_form)
3686
- HttpClient::Preconditions.assert_class('organization', organization, String)
3687
- HttpClient::Preconditions.assert_class('key', key, String)
3688
- (x = reservation_form; x.is_a?(::Io::Flow::V0::Models::ReservationForm) ? x : ::Io::Flow::V0::Models::ReservationForm.new(x))
3689
- r = @client.request("/#{CGI.escape(organization)}/inventory/reservation/#{CGI.escape(key)}").with_json(reservation_form.to_json).put
3690
- ::Io::Flow::V0::Models::Reservation.new(r)
3691
- end
3692
-
3693
- def delete_by_key(organization, key)
3694
- HttpClient::Preconditions.assert_class('organization', organization, String)
3695
- HttpClient::Preconditions.assert_class('key', key, String)
3696
- r = @client.request("/#{CGI.escape(organization)}/inventory/reservation/#{CGI.escape(key)}").delete
3697
- nil
3698
- end
3699
-
3700
- end
3701
-
3702
3661
  class Returns
3703
3662
 
3704
3663
  def initialize(client)
@@ -5310,6 +5269,13 @@ module Io
5310
5269
  nil
5311
5270
  end
5312
5271
 
5272
+ # Clears the session geo parameters
5273
+ def put_clear_by_session(session)
5274
+ HttpClient::Preconditions.assert_class('session', session, String)
5275
+ r = @client.request("/sessions/#{CGI.escape(session)}/clear").put
5276
+ ::Io::Flow::V0::Models::Session.from_json(r)
5277
+ end
5278
+
5313
5279
  def put_organizations_by_session_and_organization(session, organization, session_put_form)
5314
5280
  HttpClient::Preconditions.assert_class('session', session, String)
5315
5281
  HttpClient::Preconditions.assert_class('organization', organization, String)
@@ -10996,6 +10962,48 @@ module Io
10996
10962
 
10997
10963
  end
10998
10964
 
10965
+ class InventoryStatus
10966
+
10967
+ attr_reader :value
10968
+
10969
+ def initialize(value)
10970
+ @value = HttpClient::Preconditions.assert_class('value', value, String)
10971
+ end
10972
+
10973
+ # Returns the instance of InventoryStatus for this value, creating a new instance for an unknown value
10974
+ def InventoryStatus.apply(value)
10975
+ if value.instance_of?(InventoryStatus)
10976
+ value
10977
+ else
10978
+ HttpClient::Preconditions.assert_class_or_nil('value', value, String)
10979
+ value.nil? ? nil : (from_string(value) || InventoryStatus.new(value))
10980
+ end
10981
+ end
10982
+
10983
+ # Returns the instance of InventoryStatus for this value, or nil if not found
10984
+ def InventoryStatus.from_string(value)
10985
+ HttpClient::Preconditions.assert_class('value', value, String)
10986
+ InventoryStatus.ALL.find { |v| v.value == value }
10987
+ end
10988
+
10989
+ def InventoryStatus.ALL
10990
+ @@all ||= [InventoryStatus.has_inventory, InventoryStatus.no_inventory]
10991
+ end
10992
+
10993
+ def InventoryStatus.has_inventory
10994
+ @@_has_inventory ||= InventoryStatus.new('has_inventory')
10995
+ end
10996
+
10997
+ def InventoryStatus.no_inventory
10998
+ @@_no_inventory ||= InventoryStatus.new('no_inventory')
10999
+ end
11000
+
11001
+ def to_hash
11002
+ value
11003
+ end
11004
+
11005
+ end
11006
+
10999
11007
  class InvitationErrorCode
11000
11008
 
11001
11009
  attr_reader :value
@@ -11227,6 +11235,48 @@ module Io
11227
11235
 
11228
11236
  end
11229
11237
 
11238
+ class MerchantOfRecord
11239
+
11240
+ attr_reader :value
11241
+
11242
+ def initialize(value)
11243
+ @value = HttpClient::Preconditions.assert_class('value', value, String)
11244
+ end
11245
+
11246
+ # Returns the instance of MerchantOfRecord for this value, creating a new instance for an unknown value
11247
+ def MerchantOfRecord.apply(value)
11248
+ if value.instance_of?(MerchantOfRecord)
11249
+ value
11250
+ else
11251
+ HttpClient::Preconditions.assert_class_or_nil('value', value, String)
11252
+ value.nil? ? nil : (from_string(value) || MerchantOfRecord.new(value))
11253
+ end
11254
+ end
11255
+
11256
+ # Returns the instance of MerchantOfRecord for this value, or nil if not found
11257
+ def MerchantOfRecord.from_string(value)
11258
+ HttpClient::Preconditions.assert_class('value', value, String)
11259
+ MerchantOfRecord.ALL.find { |v| v.value == value }
11260
+ end
11261
+
11262
+ def MerchantOfRecord.ALL
11263
+ @@all ||= [MerchantOfRecord.flow, MerchantOfRecord.organization]
11264
+ end
11265
+
11266
+ def MerchantOfRecord.flow
11267
+ @@_flow ||= MerchantOfRecord.new('flow')
11268
+ end
11269
+
11270
+ def MerchantOfRecord.organization
11271
+ @@_organization ||= MerchantOfRecord.new('organization')
11272
+ end
11273
+
11274
+ def to_hash
11275
+ value
11276
+ end
11277
+
11278
+ end
11279
+
11230
11280
  class Method
11231
11281
 
11232
11282
  attr_reader :value
@@ -11421,6 +11471,52 @@ module Io
11421
11471
 
11422
11472
  end
11423
11473
 
11474
+ class OrderMerchantOfRecord
11475
+
11476
+ attr_reader :value
11477
+
11478
+ def initialize(value)
11479
+ @value = HttpClient::Preconditions.assert_class('value', value, String)
11480
+ end
11481
+
11482
+ # Returns the instance of OrderMerchantOfRecord for this value, creating a new instance for an unknown value
11483
+ def OrderMerchantOfRecord.apply(value)
11484
+ if value.instance_of?(OrderMerchantOfRecord)
11485
+ value
11486
+ else
11487
+ HttpClient::Preconditions.assert_class_or_nil('value', value, String)
11488
+ value.nil? ? nil : (from_string(value) || OrderMerchantOfRecord.new(value))
11489
+ end
11490
+ end
11491
+
11492
+ # Returns the instance of OrderMerchantOfRecord for this value, or nil if not found
11493
+ def OrderMerchantOfRecord.from_string(value)
11494
+ HttpClient::Preconditions.assert_class('value', value, String)
11495
+ OrderMerchantOfRecord.ALL.find { |v| v.value == value }
11496
+ end
11497
+
11498
+ def OrderMerchantOfRecord.ALL
11499
+ @@all ||= [OrderMerchantOfRecord.flow, OrderMerchantOfRecord.organization, OrderMerchantOfRecord.mixed]
11500
+ end
11501
+
11502
+ def OrderMerchantOfRecord.flow
11503
+ @@_flow ||= OrderMerchantOfRecord.new('flow')
11504
+ end
11505
+
11506
+ def OrderMerchantOfRecord.organization
11507
+ @@_organization ||= OrderMerchantOfRecord.new('organization')
11508
+ end
11509
+
11510
+ def OrderMerchantOfRecord.mixed
11511
+ @@_mixed ||= OrderMerchantOfRecord.new('mixed')
11512
+ end
11513
+
11514
+ def to_hash
11515
+ value
11516
+ end
11517
+
11518
+ end
11519
+
11424
11520
  class OrderPaymentType
11425
11521
 
11426
11522
  attr_reader :value
@@ -15772,7 +15868,7 @@ module Io
15772
15868
  # capture up to the amount of the authorization.
15773
15869
  class CardAuthorization < Authorization
15774
15870
 
15775
- attr_reader :id, :key, :method, :card, :amount, :currency, :requested, :customer, :attributes, :destination, :order, :ip, :result, :created_at, :expires_at
15871
+ attr_reader :id, :key, :merchant_of_record, :method, :card, :amount, :currency, :requested, :customer, :attributes, :destination, :order, :ip, :result, :created_at, :expires_at
15776
15872
 
15777
15873
  def initialize(incoming={})
15778
15874
  super(:discriminator => Authorization::Types::CARD_AUTHORIZATION)
@@ -15780,6 +15876,7 @@ module Io
15780
15876
  HttpClient::Preconditions.require_keys(opts, [:id, :key, :card, :amount, :currency, :customer, :attributes, :result, :created_at], 'CardAuthorization')
15781
15877
  @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
15782
15878
  @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
15879
+ @merchant_of_record = (x = (x = opts.delete(:merchant_of_record); x.nil? ? "flow" : x); x.is_a?(::Io::Flow::V0::Models::MerchantOfRecord) ? x : ::Io::Flow::V0::Models::MerchantOfRecord.apply(x))
15783
15880
  @method = (x = opts.delete(:method); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::PaymentMethod) ? x : ::Io::Flow::V0::Models::PaymentMethod.new(x)))
15784
15881
  @card = (x = opts.delete(:card); x.is_a?(::Io::Flow::V0::Models::ExpandableCard) ? x : ::Io::Flow::V0::Models::ExpandableCard.from_json(x))
15785
15882
  @amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal)
@@ -15807,6 +15904,7 @@ module Io
15807
15904
  {
15808
15905
  :id => id,
15809
15906
  :key => key,
15907
+ :merchant_of_record => merchant_of_record.value,
15810
15908
  :method => method.nil? ? nil : method.to_hash,
15811
15909
  :card => card.to_hash,
15812
15910
  :amount => amount,
@@ -21890,6 +21988,62 @@ module Io
21890
21988
 
21891
21989
  end
21892
21990
 
21991
+ class InventoryCheckResponse
21992
+
21993
+ attr_reader :items
21994
+
21995
+ def initialize(incoming={})
21996
+ opts = HttpClient::Helper.symbolize_keys(incoming)
21997
+ HttpClient::Preconditions.require_keys(opts, [:items], 'InventoryCheckResponse')
21998
+ @items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::InventoryCheckResponseItem) ? x : ::Io::Flow::V0::Models::InventoryCheckResponseItem.new(x)) }
21999
+ end
22000
+
22001
+ def to_json
22002
+ JSON.dump(to_hash)
22003
+ end
22004
+
22005
+ def copy(incoming={})
22006
+ InventoryCheckResponse.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
22007
+ end
22008
+
22009
+ def to_hash
22010
+ {
22011
+ :items => items.map { |o| o.to_hash }
22012
+ }
22013
+ end
22014
+
22015
+ end
22016
+
22017
+ class InventoryCheckResponseItem
22018
+
22019
+ attr_reader :number, :quantity, :inventory_status
22020
+
22021
+ def initialize(incoming={})
22022
+ opts = HttpClient::Helper.symbolize_keys(incoming)
22023
+ HttpClient::Preconditions.require_keys(opts, [:number, :quantity, :inventory_status], 'InventoryCheckResponseItem')
22024
+ @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
22025
+ @quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
22026
+ @inventory_status = (x = opts.delete(:inventory_status); x.is_a?(::Io::Flow::V0::Models::InventoryStatus) ? x : ::Io::Flow::V0::Models::InventoryStatus.apply(x))
22027
+ end
22028
+
22029
+ def to_json
22030
+ JSON.dump(to_hash)
22031
+ end
22032
+
22033
+ def copy(incoming={})
22034
+ InventoryCheckResponseItem.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
22035
+ end
22036
+
22037
+ def to_hash
22038
+ {
22039
+ :number => number,
22040
+ :quantity => quantity,
22041
+ :inventory_status => inventory_status.value
22042
+ }
22043
+ end
22044
+
22045
+ end
22046
+
21893
22047
  class InventoryItemReference
21894
22048
 
21895
22049
  attr_reader :number
@@ -21916,6 +22070,60 @@ module Io
21916
22070
 
21917
22071
  end
21918
22072
 
22073
+ class InventoryRequest
22074
+
22075
+ attr_reader :items
22076
+
22077
+ def initialize(incoming={})
22078
+ opts = HttpClient::Helper.symbolize_keys(incoming)
22079
+ HttpClient::Preconditions.require_keys(opts, [:items], 'InventoryRequest')
22080
+ @items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::InventoryRequestItem) ? x : ::Io::Flow::V0::Models::InventoryRequestItem.new(x)) }
22081
+ end
22082
+
22083
+ def to_json
22084
+ JSON.dump(to_hash)
22085
+ end
22086
+
22087
+ def copy(incoming={})
22088
+ InventoryRequest.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
22089
+ end
22090
+
22091
+ def to_hash
22092
+ {
22093
+ :items => items.map { |o| o.to_hash }
22094
+ }
22095
+ end
22096
+
22097
+ end
22098
+
22099
+ class InventoryRequestItem
22100
+
22101
+ attr_reader :number, :quantity
22102
+
22103
+ def initialize(incoming={})
22104
+ opts = HttpClient::Helper.symbolize_keys(incoming)
22105
+ HttpClient::Preconditions.require_keys(opts, [:number, :quantity], 'InventoryRequestItem')
22106
+ @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
22107
+ @quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
22108
+ end
22109
+
22110
+ def to_json
22111
+ JSON.dump(to_hash)
22112
+ end
22113
+
22114
+ def copy(incoming={})
22115
+ InventoryRequestItem.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
22116
+ end
22117
+
22118
+ def to_hash
22119
+ {
22120
+ :number => number,
22121
+ :quantity => quantity
22122
+ }
22123
+ end
22124
+
22125
+ end
22126
+
21919
22127
  # Ordered list of rules to apply, from first to last, to get available quantity.
21920
22128
  # This is unique per organization
21921
22129
  class InventoryRule
@@ -25033,7 +25241,7 @@ module Io
25033
25241
 
25034
25242
  class OnlineAuthorization < Authorization
25035
25243
 
25036
- attr_reader :id, :key, :method, :details, :payment, :amount, :currency, :requested, :customer, :attributes, :destination, :order, :ip, :result, :created_at, :expires_at
25244
+ attr_reader :id, :key, :method, :merchant_of_record, :details, :payment, :amount, :currency, :requested, :customer, :attributes, :destination, :order, :ip, :result, :created_at, :expires_at
25037
25245
 
25038
25246
  def initialize(incoming={})
25039
25247
  super(:discriminator => Authorization::Types::ONLINE_AUTHORIZATION)
@@ -25042,6 +25250,7 @@ module Io
25042
25250
  @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
25043
25251
  @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
25044
25252
  @method = (x = opts.delete(:method); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::PaymentMethod) ? x : ::Io::Flow::V0::Models::PaymentMethod.new(x)))
25253
+ @merchant_of_record = (x = (x = opts.delete(:merchant_of_record); x.nil? ? "flow" : x); x.is_a?(::Io::Flow::V0::Models::MerchantOfRecord) ? x : ::Io::Flow::V0::Models::MerchantOfRecord.apply(x))
25045
25254
  @details = (x = opts.delete(:details); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::OnlineAuthorizationDetails) ? x : ::Io::Flow::V0::Models::OnlineAuthorizationDetails.from_json(x)))
25046
25255
  @payment = (x = opts.delete(:payment); x.nil? ? nil : HttpClient::Preconditions.assert_class('payment', HttpClient::Helper.to_object(x), Hash))
25047
25256
  @amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal)
@@ -25070,6 +25279,7 @@ module Io
25070
25279
  :id => id,
25071
25280
  :key => key,
25072
25281
  :method => method.nil? ? nil : method.to_hash,
25282
+ :merchant_of_record => merchant_of_record.value,
25073
25283
  :details => details.nil? ? nil : details.to_hash,
25074
25284
  :payment => payment,
25075
25285
  :amount => amount,
@@ -25228,7 +25438,7 @@ module Io
25228
25438
  # order.
25229
25439
  class Order < ExpandableOrder
25230
25440
 
25231
- attr_reader :id, :number, :experience, :customer, :delivered_duty, :destination, :expires_at, :items, :deliveries, :selections, :prices, :total, :attributes, :submitted_at, :lines, :identifiers, :promotions, :payments, :balance, :rules
25441
+ attr_reader :id, :number, :merchant_of_record, :experience, :customer, :delivered_duty, :destination, :expires_at, :items, :deliveries, :selections, :prices, :total, :attributes, :submitted_at, :lines, :identifiers, :promotions, :payments, :balance, :rules
25232
25442
 
25233
25443
  def initialize(incoming={})
25234
25444
  super(:discriminator => ExpandableOrder::Types::ORDER)
@@ -25236,6 +25446,7 @@ module Io
25236
25446
  HttpClient::Preconditions.require_keys(opts, [:id, :number, :customer, :delivered_duty, :destination, :expires_at, :items, :deliveries, :selections, :prices, :total, :attributes], 'Order')
25237
25447
  @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
25238
25448
  @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
25449
+ @merchant_of_record = (x = (x = opts.delete(:merchant_of_record); x.nil? ? "flow" : x); x.is_a?(::Io::Flow::V0::Models::OrderMerchantOfRecord) ? x : ::Io::Flow::V0::Models::OrderMerchantOfRecord.apply(x))
25239
25450
  @experience = (x = opts.delete(:experience); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ExpandableExperience) ? x : ::Io::Flow::V0::Models::ExpandableExperience.from_json(x)))
25240
25451
  @customer = (x = opts.delete(:customer); x.is_a?(::Io::Flow::V0::Models::Customer) ? x : ::Io::Flow::V0::Models::Customer.new(x))
25241
25452
  @delivered_duty = (x = opts.delete(:delivered_duty); x.is_a?(::Io::Flow::V0::Models::DeliveredDuty) ? x : ::Io::Flow::V0::Models::DeliveredDuty.apply(x))
@@ -25268,6 +25479,7 @@ module Io
25268
25479
  {
25269
25480
  :id => id,
25270
25481
  :number => number,
25482
+ :merchant_of_record => merchant_of_record.value,
25271
25483
  :experience => experience.nil? ? nil : experience.to_hash,
25272
25484
  :customer => customer.to_hash,
25273
25485
  :delivered_duty => delivered_duty.value,
@@ -26026,13 +26238,14 @@ module Io
26026
26238
  # type of the payment can be used to further lookup transaction level detail
26027
26239
  class OrderPayment
26028
26240
 
26029
- attr_reader :id, :type, :reference, :description, :total, :address
26241
+ attr_reader :id, :type, :merchant_of_record, :reference, :description, :total, :address
26030
26242
 
26031
26243
  def initialize(incoming={})
26032
26244
  opts = HttpClient::Helper.symbolize_keys(incoming)
26033
26245
  HttpClient::Preconditions.require_keys(opts, [:id, :type, :reference, :description, :total], 'OrderPayment')
26034
26246
  @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
26035
26247
  @type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::OrderPaymentType) ? x : ::Io::Flow::V0::Models::OrderPaymentType.apply(x))
26248
+ @merchant_of_record = (x = (x = opts.delete(:merchant_of_record); x.nil? ? "flow" : x); x.is_a?(::Io::Flow::V0::Models::MerchantOfRecord) ? x : ::Io::Flow::V0::Models::MerchantOfRecord.apply(x))
26036
26249
  @reference = HttpClient::Preconditions.assert_class('reference', opts.delete(:reference), String)
26037
26250
  @description = HttpClient::Preconditions.assert_class('description', opts.delete(:description), String)
26038
26251
  @total = (x = opts.delete(:total); x.is_a?(::Io::Flow::V0::Models::PriceWithBase) ? x : ::Io::Flow::V0::Models::PriceWithBase.new(x))
@@ -26051,6 +26264,7 @@ module Io
26051
26264
  {
26052
26265
  :id => id,
26053
26266
  :type => type.value,
26267
+ :merchant_of_record => merchant_of_record.value,
26054
26268
  :reference => reference,
26055
26269
  :description => description,
26056
26270
  :total => total.to_hash,
@@ -26290,7 +26504,7 @@ module Io
26290
26504
 
26291
26505
  class OrderUpserted < Event
26292
26506
 
26293
- 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, :geo
26507
+ 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, :geo, :merchant_of_record
26294
26508
 
26295
26509
  def initialize(incoming={})
26296
26510
  super(:discriminator => Event::Types::ORDER_UPSERTED)
@@ -26319,6 +26533,7 @@ module Io
26319
26533
  @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::Line) ? x : ::Io::Flow::V0::Models::Line.new(x)) })
26320
26534
  @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 })
26321
26535
  @geo = (x = opts.delete(:geo); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::OrderGeo) ? x : ::Io::Flow::V0::Models::OrderGeo.new(x)))
26536
+ @merchant_of_record = (x = (x = opts.delete(:merchant_of_record); x.nil? ? "flow" : x); x.is_a?(::Io::Flow::V0::Models::OrderMerchantOfRecord) ? x : ::Io::Flow::V0::Models::OrderMerchantOfRecord.apply(x))
26322
26537
  end
26323
26538
 
26324
26539
  def to_json
@@ -26353,7 +26568,8 @@ module Io
26353
26568
  :submitted_at => submitted_at,
26354
26569
  :lines => lines.nil? ? nil : lines.map { |o| o.to_hash },
26355
26570
  :attributes => attributes.nil? ? nil : attributes,
26356
- :geo => geo.nil? ? nil : geo.to_hash
26571
+ :geo => geo.nil? ? nil : geo.to_hash,
26572
+ :merchant_of_record => merchant_of_record.value
26357
26573
  }
26358
26574
  end
26359
26575
 
@@ -28105,6 +28321,88 @@ module Io
28105
28321
 
28106
28322
  end
28107
28323
 
28324
+ class PfsInventoryCheckResponse
28325
+
28326
+ attr_reader :items
28327
+
28328
+ def initialize(incoming={})
28329
+ opts = HttpClient::Helper.symbolize_keys(incoming)
28330
+ HttpClient::Preconditions.require_keys(opts, [:items], 'PfsInventoryCheckResponse')
28331
+ @items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Hash).inject({}) { |h, d| h[d[0]] = (x = d[1]; x.is_a?(::Io::Flow::V0::Models::PfsInventoryCheckResponseItem) ? x : ::Io::Flow::V0::Models::PfsInventoryCheckResponseItem.new(x)); h }
28332
+ end
28333
+
28334
+ def to_json
28335
+ JSON.dump(to_hash)
28336
+ end
28337
+
28338
+ def copy(incoming={})
28339
+ PfsInventoryCheckResponse.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
28340
+ end
28341
+
28342
+ def to_hash
28343
+ {
28344
+ :items => items.inject({}) { |hash, o| hash[o[0]] = o[1].nil? ? nil : o[1].to_hash; hash }
28345
+ }
28346
+ end
28347
+
28348
+ end
28349
+
28350
+ class PfsInventoryCheckResponseItem
28351
+
28352
+ attr_reader :number, :ats, :in_stock
28353
+
28354
+ def initialize(incoming={})
28355
+ opts = HttpClient::Helper.symbolize_keys(incoming)
28356
+ HttpClient::Preconditions.require_keys(opts, [:number, :ats, :in_stock], 'PfsInventoryCheckResponseItem')
28357
+ @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
28358
+ @ats = HttpClient::Preconditions.assert_class('ats', opts.delete(:ats), Integer)
28359
+ @in_stock = HttpClient::Preconditions.assert_boolean('in_stock', opts.delete(:in_stock))
28360
+ end
28361
+
28362
+ def to_json
28363
+ JSON.dump(to_hash)
28364
+ end
28365
+
28366
+ def copy(incoming={})
28367
+ PfsInventoryCheckResponseItem.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
28368
+ end
28369
+
28370
+ def to_hash
28371
+ {
28372
+ :number => number,
28373
+ :ats => ats,
28374
+ :in_stock => in_stock
28375
+ }
28376
+ end
28377
+
28378
+ end
28379
+
28380
+ class PfsInventoryStatus
28381
+
28382
+ attr_reader :status
28383
+
28384
+ def initialize(incoming={})
28385
+ opts = HttpClient::Helper.symbolize_keys(incoming)
28386
+ HttpClient::Preconditions.require_keys(opts, [:status], 'PfsInventoryStatus')
28387
+ @status = HttpClient::Preconditions.assert_class('status', opts.delete(:status), String)
28388
+ end
28389
+
28390
+ def to_json
28391
+ JSON.dump(to_hash)
28392
+ end
28393
+
28394
+ def copy(incoming={})
28395
+ PfsInventoryStatus.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
28396
+ end
28397
+
28398
+ def to_hash
28399
+ {
28400
+ :status => status
28401
+ }
28402
+ end
28403
+
28404
+ end
28405
+
28108
28406
  class PhraseHint
28109
28407
 
28110
28408
  attr_reader :phrase, :tariff_code
@@ -30192,14 +30490,13 @@ module Io
30192
30490
 
30193
30491
  class ReservationForm
30194
30492
 
30195
- attr_reader :order_number, :items, :duration
30493
+ attr_reader :order_number, :items
30196
30494
 
30197
30495
  def initialize(incoming={})
30198
30496
  opts = HttpClient::Helper.symbolize_keys(incoming)
30199
30497
  HttpClient::Preconditions.require_keys(opts, [:items], 'ReservationForm')
30200
30498
  @order_number = (x = opts.delete(:order_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('order_number', x, String))
30201
30499
  @items = HttpClient::Preconditions.assert_class('items', opts.delete(:items), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ReservationItemForm) ? x : ::Io::Flow::V0::Models::ReservationItemForm.new(x)) }
30202
- @duration = (x = opts.delete(:duration); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Duration) ? x : ::Io::Flow::V0::Models::Duration.new(x)))
30203
30500
  end
30204
30501
 
30205
30502
  def to_json
@@ -30213,8 +30510,7 @@ module Io
30213
30510
  def to_hash
30214
30511
  {
30215
30512
  :order_number => order_number,
30216
- :items => items.map { |o| o.to_hash },
30217
- :duration => duration.nil? ? nil : duration.to_hash
30513
+ :items => items.map { |o| o.to_hash }
30218
30514
  }
30219
30515
  end
30220
30516
 
@@ -30222,14 +30518,13 @@ module Io
30222
30518
 
30223
30519
  class ReservationItem
30224
30520
 
30225
- attr_reader :item, :quantity, :serials
30521
+ attr_reader :item, :quantity
30226
30522
 
30227
30523
  def initialize(incoming={})
30228
30524
  opts = HttpClient::Helper.symbolize_keys(incoming)
30229
30525
  HttpClient::Preconditions.require_keys(opts, [:item, :quantity], 'ReservationItem')
30230
30526
  @item = (x = opts.delete(:item); x.is_a?(::Io::Flow::V0::Models::ReservationItemReference) ? x : ::Io::Flow::V0::Models::ReservationItemReference.new(x))
30231
30527
  @quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
30232
- @serials = (x = opts.delete(:serials); x.nil? ? nil : HttpClient::Preconditions.assert_class('serials', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ReservationSerialReference) ? x : ::Io::Flow::V0::Models::ReservationSerialReference.new(x)) })
30233
30528
  end
30234
30529
 
30235
30530
  def to_json
@@ -30243,8 +30538,7 @@ module Io
30243
30538
  def to_hash
30244
30539
  {
30245
30540
  :item => item.to_hash,
30246
- :quantity => quantity,
30247
- :serials => serials.nil? ? nil : serials.map { |o| o.to_hash }
30541
+ :quantity => quantity
30248
30542
  }
30249
30543
  end
30250
30544
 
@@ -30252,14 +30546,13 @@ module Io
30252
30546
 
30253
30547
  class ReservationItemForm
30254
30548
 
30255
- attr_reader :item_number, :quantity, :serial_numbers
30549
+ attr_reader :item_number, :quantity
30256
30550
 
30257
30551
  def initialize(incoming={})
30258
30552
  opts = HttpClient::Helper.symbolize_keys(incoming)
30259
- HttpClient::Preconditions.require_keys(opts, [:item_number], 'ReservationItemForm')
30553
+ HttpClient::Preconditions.require_keys(opts, [:item_number, :quantity], 'ReservationItemForm')
30260
30554
  @item_number = HttpClient::Preconditions.assert_class('item_number', opts.delete(:item_number), String)
30261
- @quantity = (x = opts.delete(:quantity); x.nil? ? nil : HttpClient::Preconditions.assert_class('quantity', x, Integer))
30262
- @serial_numbers = (x = opts.delete(:serial_numbers); x.nil? ? nil : HttpClient::Preconditions.assert_class('serial_numbers', x, Array).map { |v| HttpClient::Preconditions.assert_class('serial_numbers', v, String) })
30555
+ @quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
30263
30556
  end
30264
30557
 
30265
30558
  def to_json
@@ -30273,8 +30566,7 @@ module Io
30273
30566
  def to_hash
30274
30567
  {
30275
30568
  :item_number => item_number,
30276
- :quantity => quantity,
30277
- :serial_numbers => serial_numbers.nil? ? nil : serial_numbers
30569
+ :quantity => quantity
30278
30570
  }
30279
30571
  end
30280
30572
 
@@ -30332,36 +30624,6 @@ module Io
30332
30624
 
30333
30625
  end
30334
30626
 
30335
- class ReservationSerialReference
30336
-
30337
- attr_reader :number, :item_price, :center
30338
-
30339
- def initialize(incoming={})
30340
- opts = HttpClient::Helper.symbolize_keys(incoming)
30341
- HttpClient::Preconditions.require_keys(opts, [:number, :item_price, :center], 'ReservationSerialReference')
30342
- @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
30343
- @item_price = (x = opts.delete(:item_price); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x))
30344
- @center = (x = opts.delete(:center); x.is_a?(::Io::Flow::V0::Models::CenterReference) ? x : ::Io::Flow::V0::Models::CenterReference.new(x))
30345
- end
30346
-
30347
- def to_json
30348
- JSON.dump(to_hash)
30349
- end
30350
-
30351
- def copy(incoming={})
30352
- ReservationSerialReference.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
30353
- end
30354
-
30355
- def to_hash
30356
- {
30357
- :number => number,
30358
- :item_price => item_price.to_hash,
30359
- :center => center.to_hash
30360
- }
30361
- end
30362
-
30363
- end
30364
-
30365
30627
  class Return
30366
30628
 
30367
30629
  attr_reader :id, :key, :items, :labels
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.61
4
+ version: 0.2.62
5
5
  platform: ruby
6
6
  authors:
7
7
  - Flow Commerce, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-08 00:00:00.000000000 Z
11
+ date: 2018-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json