flowcommerce 0.2.59 → 0.2.60

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cab5eba811e139e0e913ac8a8abef82bd60877d4
4
- data.tar.gz: c7c20e06acdd3eff216b043316d5a76b6dad773b
3
+ metadata.gz: 77bb321c5c4acf77fb00e00fb564a32834c94043
4
+ data.tar.gz: 886eafd923aa789212ace66b8287442e930383f9
5
5
  SHA512:
6
- metadata.gz: f6713b2dc2fba002126272596c56d5ae862970faf5ab00fdeaecf374eb8f7bdd6eeede9eb22b5be4bc6d32130e0827c8d29f1fbee54ac5ad7e97b5113884e529
7
- data.tar.gz: 8d3c4169cd2a110833381e47d0b95b5fab9a8be53dc022139a2c36d20259fc1270cb8e0e49d9edb68ca033428095b5239628ec6e7cdad432d912f96d67b256c0
6
+ metadata.gz: 291d43436820bfc43103d9bfa2b0b6243ca1d94fd90c632c9fc6820b1beaedaabce935ec71b610733e9e3ba93b19354b78db5c47d3518bf39f570299a488dfc9
7
+ data.tar.gz: 3b270d2f2cccaca2ce5a14b49ad222c432d842d5d101db370b0084a7e9a43a803ba36736dacd28bde40e20b13c153eb577e9f027ae476ee141eec5c50c36cf7f
@@ -1,6 +1,6 @@
1
1
  # Generated by API Builder - https://www.apibuilder.io
2
2
  # Service version: 0.5.16
3
- # apibuilder 0.14.3 app.apibuilder.io/flow/api/0.5.23/ruby_client
3
+ # apibuilder 0.14.3 app.apibuilder.io/flow/api/0.5.29/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.23/ruby_client' unless defined?(Constants::USER_AGENT)
28
+ USER_AGENT = 'apibuilder 0.14.3 app.apibuilder.io/flow/api/0.5.29/ruby_client' unless defined?(Constants::USER_AGENT)
29
29
  VERSION = '0.5.16' unless defined?(Constants::VERSION)
30
30
  VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
31
31
 
@@ -785,7 +785,7 @@ module Io
785
785
  :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),
786
786
  :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
787
787
  :offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
788
- :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "name" : x), String)
788
+ :sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "position" : x), String)
789
789
  }.delete_if { |k, v| v.nil? }
790
790
  r = @client.request("/#{CGI.escape(organization)}/experiences").with_query(query).get
791
791
  r.map { |x| ::Io::Flow::V0::Models::Experience.new(x) }
@@ -1422,6 +1422,23 @@ module Io
1422
1422
  ::Io::Flow::V0::Models::OrderBuilder.new(r)
1423
1423
  end
1424
1424
 
1425
+ def put_carts_by_number(organization, number, order_put_form, incoming={})
1426
+ HttpClient::Preconditions.assert_class('organization', organization, String)
1427
+ HttpClient::Preconditions.assert_class('number', number, String)
1428
+ opts = HttpClient::Helper.symbolize_keys(incoming)
1429
+ query = {
1430
+ :experience => (x = opts.delete(:experience); x.nil? ? nil : HttpClient::Preconditions.assert_class('experience', x, String)),
1431
+ :country => (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, String)),
1432
+ :ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)),
1433
+ :currency => (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)),
1434
+ :language => (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)),
1435
+ :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
1436
+ }.delete_if { |k, v| v.nil? }
1437
+ (x = order_put_form; x.is_a?(::Io::Flow::V0::Models::OrderPutForm) ? x : ::Io::Flow::V0::Models::OrderPutForm.new(x))
1438
+ r = @client.request("/#{CGI.escape(organization)}/order/builders/carts/#{CGI.escape(number)}").with_query(query).with_json(order_put_form.to_json).put
1439
+ ::Io::Flow::V0::Models::OrderBuilder.new(r)
1440
+ end
1441
+
1425
1442
  def put_by_number(organization, number, order_put_form, incoming={})
1426
1443
  HttpClient::Preconditions.assert_class('organization', organization, String)
1427
1444
  HttpClient::Preconditions.assert_class('number', number, String)
@@ -1439,6 +1456,18 @@ module Io
1439
1456
  ::Io::Flow::V0::Models::OrderBuilder.new(r)
1440
1457
  end
1441
1458
 
1459
+ def put_attributes_by_number(organization, number, order_builder_attributes_form, incoming={})
1460
+ HttpClient::Preconditions.assert_class('organization', organization, String)
1461
+ HttpClient::Preconditions.assert_class('number', number, String)
1462
+ opts = HttpClient::Helper.symbolize_keys(incoming)
1463
+ query = {
1464
+ :expand => (x = opts.delete(:expand); x.nil? ? nil : HttpClient::Preconditions.assert_class('expand', x, Array).map { |v| HttpClient::Preconditions.assert_class('expand', v, String) })
1465
+ }.delete_if { |k, v| v.nil? }
1466
+ (x = order_builder_attributes_form; x.is_a?(::Io::Flow::V0::Models::OrderBuilderAttributesForm) ? x : ::Io::Flow::V0::Models::OrderBuilderAttributesForm.new(x))
1467
+ r = @client.request("/#{CGI.escape(organization)}/order/builders/#{CGI.escape(number)}/attributes").with_query(query).with_json(order_builder_attributes_form.to_json).put
1468
+ ::Io::Flow::V0::Models::OrderBuilder.new(r)
1469
+ end
1470
+
1442
1471
  def put_destination_by_number(organization, number, order_builder_destination_form, incoming={})
1443
1472
  HttpClient::Preconditions.assert_class('organization', organization, String)
1444
1473
  HttpClient::Preconditions.assert_class('number', number, String)
@@ -10273,7 +10302,7 @@ module Io
10273
10302
  end
10274
10303
 
10275
10304
  def ExperienceStatus.ALL
10276
- @@all ||= [ExperienceStatus.draft, ExperienceStatus.active, ExperienceStatus.archived]
10305
+ @@all ||= [ExperienceStatus.draft, ExperienceStatus.active, ExperienceStatus.archiving, ExperienceStatus.archived]
10277
10306
  end
10278
10307
 
10279
10308
  def ExperienceStatus.draft
@@ -10284,6 +10313,12 @@ module Io
10284
10313
  @@_active ||= ExperienceStatus.new('active')
10285
10314
  end
10286
10315
 
10316
+ # Archiving indicates an experience has been archived. We allow some time for
10317
+ # sessions to expire before fully marking the experience archived.
10318
+ def ExperienceStatus.archiving
10319
+ @@_archiving ||= ExperienceStatus.new('archiving')
10320
+ end
10321
+
10287
10322
  def ExperienceStatus.archived
10288
10323
  @@_archived ||= ExperienceStatus.new('archived')
10289
10324
  end
@@ -10740,7 +10775,7 @@ module Io
10740
10775
  end
10741
10776
 
10742
10777
  def ImportType.ALL
10743
- @@all ||= [ImportType.harmonization_codes, ImportType.catalog_items, ImportType.customs_descriptions, ImportType.item_form_overlays]
10778
+ @@all ||= [ImportType.harmonization_codes, ImportType.catalog_items, ImportType.customs_descriptions, ImportType.customs_description_tariffs, ImportType.item_form_overlays]
10744
10779
  end
10745
10780
 
10746
10781
  # Provides upload of HS-6 and HS-10 codes for the items in a catalog
@@ -10758,6 +10793,12 @@ module Io
10758
10793
  @@_customs_descriptions ||= ImportType.new('customs_descriptions')
10759
10794
  end
10760
10795
 
10796
+ # Provides upload of customs descriptions and corresponding tarrifs. These are
10797
+ # independent of any catalog, product, or item.
10798
+ def ImportType.customs_description_tariffs
10799
+ @@_customs_description_tariffs ||= ImportType.new('customs_description_tariffs')
10800
+ end
10801
+
10761
10802
  # Provides upload of item form overlays for the items in a catalog.
10762
10803
  def ImportType.item_form_overlays
10763
10804
  @@_item_form_overlays ||= ImportType.new('item_form_overlays')
@@ -13077,7 +13118,12 @@ module Io
13077
13118
  end
13078
13119
 
13079
13120
  def ShopifyGrant.ALL
13080
- @@all ||= [ShopifyGrant.discount, ShopifyGrant.gift_card, ShopifyGrant.metafield, ShopifyGrant.order]
13121
+ @@all ||= [ShopifyGrant.customer, ShopifyGrant.discount, ShopifyGrant.gift_card, ShopifyGrant.metafield, ShopifyGrant.order]
13122
+ end
13123
+
13124
+ # Access to /admin/customers.json
13125
+ def ShopifyGrant.customer
13126
+ @@_customer ||= ShopifyGrant.new('customer')
13081
13127
  end
13082
13128
 
13083
13129
  # Access to /admin/price_rules/:id/discount_codes.json
@@ -15208,17 +15254,18 @@ module Io
15208
15254
 
15209
15255
  class AuthorizationUpserted < Event
15210
15256
 
15211
- attr_reader :event_id, :timestamp, :organization, :key, :order_number, :amount, :currency, :customer, :attributes, :destination, :result, :ip, :created_at
15257
+ attr_reader :event_id, :timestamp, :organization, :key, :order_number, :card, :amount, :currency, :customer, :attributes, :destination, :result, :ip, :created_at
15212
15258
 
15213
15259
  def initialize(incoming={})
15214
15260
  super(:discriminator => Event::Types::AUTHORIZATION_UPSERTED)
15215
15261
  opts = HttpClient::Helper.symbolize_keys(incoming)
15216
- HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :key, :amount, :currency, :customer, :attributes, :result, :created_at], 'AuthorizationUpserted')
15262
+ HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :key, :card, :amount, :currency, :customer, :attributes, :result, :created_at], 'AuthorizationUpserted')
15217
15263
  @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
15218
15264
  @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
15219
15265
  @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
15220
15266
  @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
15221
15267
  @order_number = (x = opts.delete(:order_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('order_number', x, String))
15268
+ @card = (x = opts.delete(:card); x.is_a?(::Io::Flow::V0::Models::ExpandableCard) ? x : ::Io::Flow::V0::Models::ExpandableCard.from_json(x))
15222
15269
  @amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal)
15223
15270
  @currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
15224
15271
  @customer = (x = opts.delete(:customer); x.is_a?(::Io::Flow::V0::Models::Customer) ? x : ::Io::Flow::V0::Models::Customer.new(x))
@@ -15244,6 +15291,7 @@ module Io
15244
15291
  :organization => organization,
15245
15292
  :key => key,
15246
15293
  :order_number => order_number,
15294
+ :card => card.to_hash,
15247
15295
  :amount => amount,
15248
15296
  :currency => currency,
15249
15297
  :customer => customer.to_hash,
@@ -18961,7 +19009,7 @@ module Io
18961
19009
  # Experiences define a local experience for a given geographic region
18962
19010
  class ExperienceForm
18963
19011
 
18964
- attr_reader :region_id, :name, :delivered_duty, :country, :currency, :language, :key, :measurement_system, :subcatalog_id, :position
19012
+ attr_reader :region_id, :name, :delivered_duty, :country, :currency, :language, :key, :measurement_system, :subcatalog_id
18965
19013
 
18966
19014
  def initialize(incoming={})
18967
19015
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -18975,7 +19023,6 @@ module Io
18975
19023
  @key = (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, String))
18976
19024
  @measurement_system = (x = opts.delete(:measurement_system); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::MeasurementSystem) ? x : ::Io::Flow::V0::Models::MeasurementSystem.apply(x)))
18977
19025
  @subcatalog_id = (x = opts.delete(:subcatalog_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('subcatalog_id', x, String))
18978
- @position = (x = opts.delete(:position); x.nil? ? nil : HttpClient::Preconditions.assert_class('position', x, Integer))
18979
19026
  end
18980
19027
 
18981
19028
  def to_json
@@ -18996,8 +19043,7 @@ module Io
18996
19043
  :language => language,
18997
19044
  :key => key,
18998
19045
  :measurement_system => measurement_system.nil? ? nil : measurement_system.value,
18999
- :subcatalog_id => subcatalog_id,
19000
- :position => position
19046
+ :subcatalog_id => subcatalog_id
19001
19047
  }
19002
19048
  end
19003
19049
 
@@ -20840,7 +20886,7 @@ module Io
20840
20886
  @item_numbers = HttpClient::Preconditions.assert_class('item_numbers', opts.delete(:item_numbers), Array).map { |v| HttpClient::Preconditions.assert_class('item_numbers', v, String) }
20841
20887
  @source_address = (x = opts.delete(:source_address); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Address) ? x : ::Io::Flow::V0::Models::Address.new(x)))
20842
20888
  @order_number = (x = opts.delete(:order_number); x.nil? ? nil : HttpClient::Preconditions.assert_class('order_number', x, String))
20843
- @line_items = (x = opts.delete(:line_items); x.nil? ? nil : HttpClient::Preconditions.assert_class('line_items', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::LineItemForm) ? x : ::Io::Flow::V0::Models::LineItemForm.new(x)) })
20889
+ @line_items = (x = opts.delete(:line_items); x.nil? ? nil : HttpClient::Preconditions.assert_class('line_items', x, Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::LineItem) ? x : ::Io::Flow::V0::Models::LineItem.new(x)) })
20844
20890
  end
20845
20891
 
20846
20892
  def to_json
@@ -25317,6 +25363,32 @@ module Io
25317
25363
 
25318
25364
  end
25319
25365
 
25366
+ class OrderBuilderAttributesForm
25367
+
25368
+ attr_reader :attributes
25369
+
25370
+ def initialize(incoming={})
25371
+ opts = HttpClient::Helper.symbolize_keys(incoming)
25372
+ HttpClient::Preconditions.require_keys(opts, [:attributes], 'OrderBuilderAttributesForm')
25373
+ @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 }
25374
+ end
25375
+
25376
+ def to_json
25377
+ JSON.dump(to_hash)
25378
+ end
25379
+
25380
+ def copy(incoming={})
25381
+ OrderBuilderAttributesForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
25382
+ end
25383
+
25384
+ def to_hash
25385
+ {
25386
+ :attributes => attributes
25387
+ }
25388
+ end
25389
+
25390
+ end
25391
+
25320
25392
  class OrderBuilderDeliveredDutyForm
25321
25393
 
25322
25394
  attr_reader :delivered_duty
@@ -25649,6 +25721,39 @@ module Io
25649
25721
 
25650
25722
  end
25651
25723
 
25724
+ # The geolocated information for an order
25725
+ class OrderGeo
25726
+
25727
+ attr_reader :ip, :country, :currency, :language
25728
+
25729
+ def initialize(incoming={})
25730
+ opts = HttpClient::Helper.symbolize_keys(incoming)
25731
+ HttpClient::Preconditions.require_keys(opts, [:country], 'OrderGeo')
25732
+ @ip = (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String))
25733
+ @country = HttpClient::Preconditions.assert_class('country', opts.delete(:country), String)
25734
+ @currency = (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String))
25735
+ @language = (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String))
25736
+ end
25737
+
25738
+ def to_json
25739
+ JSON.dump(to_hash)
25740
+ end
25741
+
25742
+ def copy(incoming={})
25743
+ OrderGeo.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
25744
+ end
25745
+
25746
+ def to_hash
25747
+ {
25748
+ :ip => ip,
25749
+ :country => country,
25750
+ :currency => currency,
25751
+ :language => language
25752
+ }
25753
+ end
25754
+
25755
+ end
25756
+
25652
25757
  # Represents alternate identifiers that can be used to lookup an order. Common
25653
25758
  # use cases are to support attaching a primary identifier (e.g. a nice order
25654
25759
  # number) post order submission or attaching IDs that are used by the warehouse
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.59
4
+ version: 0.2.60
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-04-24 00:00:00.000000000 Z
11
+ date: 2018-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json