flowcommerce 0.2.42 → 0.2.43

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.
@@ -1,6 +1,6 @@
1
1
  # Generated by API Builder - https://www.apibuilder.io
2
2
  # Service version: 0.3.65
3
- # apibuilder:0.12.61 https://app.apibuilder.io/flow/api/0.4.2/ruby_client
3
+ # apibuilder:0.12.61 https://app.apibuilder.io/flow/api/0.4.3/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.61 https://app.apibuilder.io/flow/api/0.4.2/ruby_client' unless defined?(Constants::USER_AGENT)
28
+ USER_AGENT = 'apibuilder:0.12.61 https://app.apibuilder.io/flow/api/0.4.3/ruby_client' unless defined?(Constants::USER_AGENT)
29
29
  VERSION = '0.3.65' unless defined?(Constants::VERSION)
30
30
  VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
31
31
 
@@ -980,6 +980,15 @@ module Io
980
980
  nil
981
981
  end
982
982
 
983
+ # Update item with the specified number, creating if it does not exist.
984
+ def put_price_by_number(organization, number, item_price_update_put_form)
985
+ HttpClient::Preconditions.assert_class('organization', organization, String)
986
+ HttpClient::Preconditions.assert_class('number', number, String)
987
+ (x = item_price_update_put_form; x.is_a?(::Io::Flow::V0::Models::ItemPriceUpdatePutForm) ? x : ::Io::Flow::V0::Models::ItemPriceUpdatePutForm.new(x))
988
+ r = @client.request("/#{CGI.escape(organization)}/catalog/items/#{CGI.escape(number)}/price").with_json(item_price_update_put_form.to_json).put
989
+ ::Io::Flow::V0::Models::Item.new(r)
990
+ end
991
+
983
992
  # Provides visibility into recent changes of each object, including deletion
984
993
  def get_versions(organization, incoming={})
985
994
  HttpClient::Preconditions.assert_class('organization', organization, String)
@@ -5470,6 +5479,7 @@ module Io
5470
5479
  HARMONIZED_ITEM_UPSERTED = 'harmonized_item_upserted' unless defined?(HARMONIZED_ITEM_UPSERTED)
5471
5480
  HARMONIZED_ITEM_DELETED = 'harmonized_item_deleted' unless defined?(HARMONIZED_ITEM_DELETED)
5472
5481
  HARMONIZED_LANDED_COST_UPSERTED = 'harmonized_landed_cost_upserted' unless defined?(HARMONIZED_LANDED_COST_UPSERTED)
5482
+ FULLY_HARMONIZED_ITEM_UPSERTED = 'fully_harmonized_item_upserted' unless defined?(FULLY_HARMONIZED_ITEM_UPSERTED)
5473
5483
  RULE_UPSERTED = 'rule_upserted' unless defined?(RULE_UPSERTED)
5474
5484
  RULE_DELETED = 'rule_deleted' unless defined?(RULE_DELETED)
5475
5485
  SNAPSHOT_UPSERTED = 'snapshot_upserted' unless defined?(SNAPSHOT_UPSERTED)
@@ -5524,7 +5534,7 @@ module Io
5524
5534
  end
5525
5535
 
5526
5536
  def subtype_to_hash
5527
- raise 'Cannot serialize an instance of event directly - must use one of the specific types: attribute_upserted, attribute_deleted, catalog_upserted, catalog_deleted, subcatalog_upserted, subcatalog_deleted, catalog_item_upserted, catalog_item_deleted, subcatalog_item_upserted, subcatalog_item_deleted, rate_deleted, rate_upserted, available_promotions_upserted, available_promotions_deleted, allocation_deleted, allocation_upserted, experience_deleted, experience_upserted, item_margin_deleted, item_margin_upserted, item_sales_margin_deleted, item_sales_margin_upserted, label_format_deleted, label_format_upserted, order_deleted, order_upserted, order_identifier_deleted, order_identifier_upserted, pricing_deleted, pricing_upserted, tier_upserted, tier_deleted, hs6_code_upserted, hs6_code_deleted, hs10_code_upserted, hs10_code_deleted, item_origin_upserted, item_origin_deleted, harmonized_item_upserted, harmonized_item_deleted, harmonized_landed_cost_upserted, rule_upserted, rule_deleted, snapshot_upserted, snapshot_deleted, label_upserted, notification_upserted, notification_deleted, manifested_label_upserted, manifested_label_deleted, local_item_upserted, local_item_deleted, membership_upserted, membership_deleted, organization_upserted, organization_deleted, authorization_upserted, authorization_deleted, authorization_deleted_v2, authorization_status_changed, card_authorization_upserted, card_authorization_upserted_v2, online_authorization_upserted, online_authorization_upserted_v2, capture_upserted, capture_upserted_v2, card_upserted, card_upserted_v2, card_deleted, payment_upserted, payment_deleted, refund_upserted, refund_upserted_v2, reversal_upserted, organization_rates_published, organization_countries_published, return_upserted, return_deleted, targeting_item_upserted, targeting_item_deleted, tracking_label_event_upserted'
5537
+ raise 'Cannot serialize an instance of event directly - must use one of the specific types: attribute_upserted, attribute_deleted, catalog_upserted, catalog_deleted, subcatalog_upserted, subcatalog_deleted, catalog_item_upserted, catalog_item_deleted, subcatalog_item_upserted, subcatalog_item_deleted, rate_deleted, rate_upserted, available_promotions_upserted, available_promotions_deleted, allocation_deleted, allocation_upserted, experience_deleted, experience_upserted, item_margin_deleted, item_margin_upserted, item_sales_margin_deleted, item_sales_margin_upserted, label_format_deleted, label_format_upserted, order_deleted, order_upserted, order_identifier_deleted, order_identifier_upserted, pricing_deleted, pricing_upserted, tier_upserted, tier_deleted, hs6_code_upserted, hs6_code_deleted, hs10_code_upserted, hs10_code_deleted, item_origin_upserted, item_origin_deleted, harmonized_item_upserted, harmonized_item_deleted, harmonized_landed_cost_upserted, fully_harmonized_item_upserted, rule_upserted, rule_deleted, snapshot_upserted, snapshot_deleted, label_upserted, notification_upserted, notification_deleted, manifested_label_upserted, manifested_label_deleted, local_item_upserted, local_item_deleted, membership_upserted, membership_deleted, organization_upserted, organization_deleted, authorization_upserted, authorization_deleted, authorization_deleted_v2, authorization_status_changed, card_authorization_upserted, card_authorization_upserted_v2, online_authorization_upserted, online_authorization_upserted_v2, capture_upserted, capture_upserted_v2, card_upserted, card_upserted_v2, card_deleted, payment_upserted, payment_deleted, refund_upserted, refund_upserted_v2, reversal_upserted, organization_rates_published, organization_countries_published, return_upserted, return_deleted, targeting_item_upserted, targeting_item_deleted, tracking_label_event_upserted'
5528
5538
  end
5529
5539
 
5530
5540
  def to_hash
@@ -5579,6 +5589,7 @@ module Io
5579
5589
  when Types::HARMONIZED_ITEM_UPSERTED; HarmonizedItemUpserted.new(hash)
5580
5590
  when Types::HARMONIZED_ITEM_DELETED; HarmonizedItemDeleted.new(hash)
5581
5591
  when Types::HARMONIZED_LANDED_COST_UPSERTED; HarmonizedLandedCostUpserted.new(hash)
5592
+ when Types::FULLY_HARMONIZED_ITEM_UPSERTED; FullyHarmonizedItemUpserted.new(hash)
5582
5593
  when Types::RULE_UPSERTED; RuleUpserted.new(hash)
5583
5594
  when Types::RULE_DELETED; RuleDeleted.new(hash)
5584
5595
  when Types::SNAPSHOT_UPSERTED; SnapshotUpserted.new(hash)
@@ -8458,7 +8469,7 @@ module Io
8458
8469
  end
8459
8470
 
8460
8471
  def EventType.ALL
8461
- @@all ||= [EventType.attribute_upserted, EventType.attribute_deleted, EventType.catalog_upserted, EventType.catalog_deleted, EventType.subcatalog_upserted, EventType.subcatalog_deleted, EventType.catalog_item_upserted, EventType.catalog_item_deleted, EventType.subcatalog_item_upserted, EventType.subcatalog_item_deleted, EventType.rate_deleted, EventType.rate_upserted, EventType.available_promotions_upserted, EventType.available_promotions_deleted, EventType.allocation_deleted, EventType.allocation_upserted, EventType.experience_deleted, EventType.experience_upserted, EventType.item_margin_deleted, EventType.item_margin_upserted, EventType.item_sales_margin_deleted, EventType.item_sales_margin_upserted, EventType.label_format_deleted, EventType.label_format_upserted, EventType.order_deleted, EventType.order_upserted, EventType.order_identifier_deleted, EventType.order_identifier_upserted, EventType.pricing_deleted, EventType.pricing_upserted, EventType.tier_upserted, EventType.tier_deleted, EventType.hs6_code_upserted, EventType.hs6_code_deleted, EventType.hs10_code_upserted, EventType.hs10_code_deleted, EventType.item_origin_upserted, EventType.item_origin_deleted, EventType.harmonized_item_upserted, EventType.harmonized_item_deleted, EventType.harmonized_landed_cost_upserted, EventType.rule_upserted, EventType.rule_deleted, EventType.snapshot_upserted, EventType.snapshot_deleted, EventType.label_upserted, EventType.notification_upserted, EventType.notification_deleted, EventType.manifested_label_upserted, EventType.manifested_label_deleted, EventType.local_item_upserted, EventType.local_item_deleted, EventType.membership_upserted, EventType.membership_deleted, EventType.organization_upserted, EventType.organization_deleted, EventType.authorization_upserted, EventType.authorization_deleted, EventType.authorization_deleted_v2, EventType.authorization_status_changed, EventType.card_authorization_upserted, EventType.card_authorization_upserted_v2, EventType.online_authorization_upserted, EventType.online_authorization_upserted_v2, EventType.capture_upserted, EventType.capture_upserted_v2, EventType.card_upserted, EventType.card_upserted_v2, EventType.card_deleted, EventType.payment_upserted, EventType.payment_deleted, EventType.refund_upserted, EventType.refund_upserted_v2, EventType.reversal_upserted, EventType.organization_rates_published, EventType.organization_countries_published, EventType.return_upserted, EventType.return_deleted, EventType.targeting_item_upserted, EventType.targeting_item_deleted, EventType.tracking_label_event_upserted]
8472
+ @@all ||= [EventType.attribute_upserted, EventType.attribute_deleted, EventType.catalog_upserted, EventType.catalog_deleted, EventType.subcatalog_upserted, EventType.subcatalog_deleted, EventType.catalog_item_upserted, EventType.catalog_item_deleted, EventType.subcatalog_item_upserted, EventType.subcatalog_item_deleted, EventType.rate_deleted, EventType.rate_upserted, EventType.available_promotions_upserted, EventType.available_promotions_deleted, EventType.allocation_deleted, EventType.allocation_upserted, EventType.experience_deleted, EventType.experience_upserted, EventType.item_margin_deleted, EventType.item_margin_upserted, EventType.item_sales_margin_deleted, EventType.item_sales_margin_upserted, EventType.label_format_deleted, EventType.label_format_upserted, EventType.order_deleted, EventType.order_upserted, EventType.order_identifier_deleted, EventType.order_identifier_upserted, EventType.pricing_deleted, EventType.pricing_upserted, EventType.tier_upserted, EventType.tier_deleted, EventType.hs6_code_upserted, EventType.hs6_code_deleted, EventType.hs10_code_upserted, EventType.hs10_code_deleted, EventType.item_origin_upserted, EventType.item_origin_deleted, EventType.harmonized_item_upserted, EventType.harmonized_item_deleted, EventType.harmonized_landed_cost_upserted, EventType.fully_harmonized_item_upserted, EventType.rule_upserted, EventType.rule_deleted, EventType.snapshot_upserted, EventType.snapshot_deleted, EventType.label_upserted, EventType.notification_upserted, EventType.notification_deleted, EventType.manifested_label_upserted, EventType.manifested_label_deleted, EventType.local_item_upserted, EventType.local_item_deleted, EventType.membership_upserted, EventType.membership_deleted, EventType.organization_upserted, EventType.organization_deleted, EventType.authorization_upserted, EventType.authorization_deleted, EventType.authorization_deleted_v2, EventType.authorization_status_changed, EventType.card_authorization_upserted, EventType.card_authorization_upserted_v2, EventType.online_authorization_upserted, EventType.online_authorization_upserted_v2, EventType.capture_upserted, EventType.capture_upserted_v2, EventType.card_upserted, EventType.card_upserted_v2, EventType.card_deleted, EventType.payment_upserted, EventType.payment_deleted, EventType.refund_upserted, EventType.refund_upserted_v2, EventType.reversal_upserted, EventType.organization_rates_published, EventType.organization_countries_published, EventType.return_upserted, EventType.return_deleted, EventType.targeting_item_upserted, EventType.targeting_item_deleted, EventType.tracking_label_event_upserted]
8462
8473
  end
8463
8474
 
8464
8475
  def EventType.attribute_upserted
@@ -8625,6 +8636,10 @@ module Io
8625
8636
  @@_harmonized_landed_cost_upserted ||= EventType.new('harmonized_landed_cost_upserted')
8626
8637
  end
8627
8638
 
8639
+ def EventType.fully_harmonized_item_upserted
8640
+ @@_fully_harmonized_item_upserted ||= EventType.new('fully_harmonized_item_upserted')
8641
+ end
8642
+
8628
8643
  def EventType.rule_upserted
8629
8644
  @@_rule_upserted ||= EventType.new('rule_upserted')
8630
8645
  end
@@ -16897,6 +16912,49 @@ module Io
16897
16912
 
16898
16913
  end
16899
16914
 
16915
+ # Event indicating insertion or changes to the details of a fully harmonized
16916
+ # item. Will be triggered upon any change to the item being harmonized, its
16917
+ # duties or taxes. If two changes occur within minutes of each other, it is
16918
+ # possible only one upserted event will be produced, aggregating both changes.
16919
+ class FullyHarmonizedItemUpserted < Event
16920
+
16921
+ attr_reader :event_id, :timestamp, :organization, :item_number, :customs_description, :hs6_code, :landed_costs
16922
+
16923
+ def initialize(incoming={})
16924
+ super(:discriminator => Event::Types::FULLY_HARMONIZED_ITEM_UPSERTED)
16925
+ opts = HttpClient::Helper.symbolize_keys(incoming)
16926
+ HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :item_number, :customs_description, :hs6_code, :landed_costs], 'FullyHarmonizedItemUpserted')
16927
+ @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
16928
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
16929
+ @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
16930
+ @item_number = HttpClient::Preconditions.assert_class('item_number', opts.delete(:item_number), String)
16931
+ @customs_description = HttpClient::Preconditions.assert_class('customs_description', opts.delete(:customs_description), String)
16932
+ @hs6_code = HttpClient::Preconditions.assert_class('hs6_code', opts.delete(:hs6_code), String)
16933
+ @landed_costs = HttpClient::Preconditions.assert_class('landed_costs', opts.delete(:landed_costs), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::LaneLandedCost) ? x : ::Io::Flow::V0::Models::LaneLandedCost.new(x)) }
16934
+ end
16935
+
16936
+ def to_json
16937
+ JSON.dump(to_hash)
16938
+ end
16939
+
16940
+ def copy(incoming={})
16941
+ FullyHarmonizedItemUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
16942
+ end
16943
+
16944
+ def subtype_to_hash
16945
+ {
16946
+ :event_id => event_id,
16947
+ :timestamp => timestamp,
16948
+ :organization => organization,
16949
+ :item_number => item_number,
16950
+ :customs_description => customs_description,
16951
+ :hs6_code => hs6_code,
16952
+ :landed_costs => landed_costs.map { |o| o.to_hash }
16953
+ }
16954
+ end
16955
+
16956
+ end
16957
+
16900
16958
  # An error of some type has occured. The most common error will be validation on
16901
16959
  # input. See messages for details.
16902
16960
  class GenericError
@@ -19453,6 +19511,36 @@ module Io
19453
19511
 
19454
19512
  end
19455
19513
 
19514
+ class ItemPriceUpdatePutForm
19515
+
19516
+ attr_reader :currency, :price, :attributes
19517
+
19518
+ def initialize(incoming={})
19519
+ opts = HttpClient::Helper.symbolize_keys(incoming)
19520
+ HttpClient::Preconditions.require_keys(opts, [:currency, :price], 'ItemPriceUpdatePutForm')
19521
+ @currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
19522
+ @price = HttpClient::Preconditions.assert_class('price', HttpClient::Helper.to_big_decimal(opts.delete(:price)), BigDecimal)
19523
+ @attributes = HttpClient::Preconditions.assert_class('attributes', (x = opts.delete(:attributes); x.nil? ? {} : x), Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('attributes', d[1], String); h }
19524
+ end
19525
+
19526
+ def to_json
19527
+ JSON.dump(to_hash)
19528
+ end
19529
+
19530
+ def copy(incoming={})
19531
+ ItemPriceUpdatePutForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
19532
+ end
19533
+
19534
+ def to_hash
19535
+ {
19536
+ :currency => currency,
19537
+ :price => price,
19538
+ :attributes => attributes
19539
+ }
19540
+ end
19541
+
19542
+ end
19543
+
19456
19544
  class ItemSalesMarginDeleted < Event
19457
19545
 
19458
19546
  attr_reader :event_id, :timestamp, :item_sales_margin_id, :organization_id, :experience_key
@@ -19785,6 +19873,42 @@ module Io
19785
19873
 
19786
19874
  end
19787
19875
 
19876
+ # The tariff codes, duty rates and tax rates associated with an
19877
+ # origin/destination pair. Does not take into account sales province
19878
+ class LaneLandedCost
19879
+
19880
+ attr_reader :origin, :destination, :tariff_code, :effective_duty, :tax
19881
+
19882
+ def initialize(incoming={})
19883
+ opts = HttpClient::Helper.symbolize_keys(incoming)
19884
+ HttpClient::Preconditions.require_keys(opts, [:origin, :destination, :tariff_code, :effective_duty, :tax], 'LaneLandedCost')
19885
+ @origin = HttpClient::Preconditions.assert_class('origin', opts.delete(:origin), String)
19886
+ @destination = HttpClient::Preconditions.assert_class('destination', opts.delete(:destination), String)
19887
+ @tariff_code = HttpClient::Preconditions.assert_class('tariff_code', opts.delete(:tariff_code), String)
19888
+ @effective_duty = (x = opts.delete(:effective_duty); x.is_a?(::Io::Flow::V0::Models::Duty) ? x : ::Io::Flow::V0::Models::Duty.new(x))
19889
+ @tax = (x = opts.delete(:tax); x.is_a?(::Io::Flow::V0::Models::Tax) ? x : ::Io::Flow::V0::Models::Tax.new(x))
19890
+ end
19891
+
19892
+ def to_json
19893
+ JSON.dump(to_hash)
19894
+ end
19895
+
19896
+ def copy(incoming={})
19897
+ LaneLandedCost.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
19898
+ end
19899
+
19900
+ def to_hash
19901
+ {
19902
+ :origin => origin,
19903
+ :destination => destination,
19904
+ :tariff_code => tariff_code,
19905
+ :effective_duty => effective_duty.to_hash,
19906
+ :tax => tax.to_hash
19907
+ }
19908
+ end
19909
+
19910
+ end
19911
+
19788
19912
  # ISO 639 2-character language code. See https://api.flow.io/reference/languages
19789
19913
  class Language
19790
19914
 
metadata CHANGED
@@ -1,27 +1,30 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flowcommerce
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.42
4
+ version: 0.2.43
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Flow Commerce, Inc.
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2017-10-11 00:00:00.000000000 Z
12
+ date: 2017-10-13 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: json
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
- - - '>='
19
+ - - ! '>='
18
20
  - !ruby/object:Gem::Version
19
21
  version: '0'
20
22
  type: :runtime
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
- - - '>='
27
+ - - ! '>='
25
28
  - !ruby/object:Gem::Version
26
29
  version: '0'
27
30
  description: Native ruby client for the Flow REST API. Detailed information at https://app.apibuilder.io/flow/api
@@ -38,25 +41,26 @@ files:
38
41
  homepage: https://github.com/flowcommerce/ruby-sdk
39
42
  licenses:
40
43
  - MIT
41
- metadata: {}
42
44
  post_install_message:
43
45
  rdoc_options: []
44
46
  require_paths:
45
47
  - lib
46
48
  required_ruby_version: !ruby/object:Gem::Requirement
49
+ none: false
47
50
  requirements:
48
- - - '>='
51
+ - - ! '>='
49
52
  - !ruby/object:Gem::Version
50
53
  version: '0'
51
54
  required_rubygems_version: !ruby/object:Gem::Requirement
55
+ none: false
52
56
  requirements:
53
- - - '>='
57
+ - - ! '>='
54
58
  - !ruby/object:Gem::Version
55
59
  version: '0'
56
60
  requirements: []
57
61
  rubyforge_project:
58
- rubygems_version: 2.0.14.1
62
+ rubygems_version: 1.8.23.2
59
63
  signing_key:
60
- specification_version: 4
64
+ specification_version: 3
61
65
  summary: Native ruby client for the Flow REST API.
62
66
  test_files: []
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 741d2dcff41d965386804f4c5626a547c4c694e4
4
- data.tar.gz: c8865a9ae02101e0549ebfc04cb5b58912847168
5
- SHA512:
6
- metadata.gz: 08cae3c4feab9a97c2a4ef0f0c4982e56b25c07159ac4b5d808878ba86b4809154f4202123a64f29d7db364412502eb66b71591639094bfc2e98774c049ce595
7
- data.tar.gz: f9be5d92e23fd67fc63ebb0266ae61b14c7e49f3d0b6602125412bae63afb7c0aea116d83ae4653ecfae1948a4ee69bd094661ab6c8dfbe40e2746defc4856b6