flowcommerce 0.0.34 → 0.0.35

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: 1496684d9043683b8d9e268ace9c6d920af0f5a7
4
- data.tar.gz: b92a5d013b47c969ece4255f874c20281668d182
3
+ metadata.gz: 7fadddab1a055a68b9e9db0f125d2aad1d54b385
4
+ data.tar.gz: ad288aeebdda5dabd66322b9c12308aef4362d24
5
5
  SHA512:
6
- metadata.gz: 97f4c40351b61fc38f1237c1942ecf6e68cc2fad29b3a8526d8d2c20b9a406b2827b8dbcb41e9e0b282f439904809043fa49b9ab9f731bfc9a3febfb446c507c
7
- data.tar.gz: 33804fffd141e10a899e681ce54baf77d1758f5f933ef2312f8d69d43e92b1d2078dea1f104734663a297450ea1f2ffc7a19e30be768f891716dfdb16ee1cead
6
+ metadata.gz: 55bd3ca8ab0c01c427f5e59538a23c293b857dae835ad71510bccca783601035cb4d81e28395b46334c66d33a6e284ce3f577c0325fa91af13eed2337942161c
7
+ data.tar.gz: 9119dcf9f3c35b204db8c6c127bcd46b5e2ede2d1d81760a3b731e64ff0c36f9a50831f4e6912129269881aff4ff214ec32e193029d463004f057957465d2940
@@ -1,6 +1,6 @@
1
1
  # Generated by apidoc - http://www.apidoc.me
2
- # Service version: 0.0.100
3
- # apidoc:0.11.33 http://www.apidoc.me/flow/api/0.1.0/ruby_client
2
+ # Service version: 0.1.3
3
+ # apidoc:0.11.33 http://www.apidoc.me/flow/api/0.1.2/ruby_client
4
4
 
5
5
  require 'cgi'
6
6
  require 'net/http'
@@ -25,8 +25,8 @@ module Io
25
25
 
26
26
  BASE_URL = 'https://api.flow.io' unless defined?(Constants::BASE_URL)
27
27
  NAMESPACE = 'io.flow.v0' unless defined?(Constants::NAMESPACE)
28
- USER_AGENT = 'apidoc:0.11.33 http://www.apidoc.me/flow/api/0.1.0/ruby_client' unless defined?(Constants::USER_AGENT)
29
- VERSION = '0.0.100' unless defined?(Constants::VERSION)
28
+ USER_AGENT = 'apidoc:0.11.33 http://www.apidoc.me/flow/api/0.1.2/ruby_client' unless defined?(Constants::USER_AGENT)
29
+ VERSION = '0.1.3' unless defined?(Constants::VERSION)
30
30
  VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
31
31
 
32
32
  end
@@ -3615,6 +3615,8 @@ module Io
3615
3615
  HS6_CODE_DELETED = 'hs6_code_deleted' unless defined?(HS6_CODE_DELETED)
3616
3616
  HS10_CODE_UPSERTED = 'hs10_code_upserted' unless defined?(HS10_CODE_UPSERTED)
3617
3617
  HS10_CODE_DELETED = 'hs10_code_deleted' unless defined?(HS10_CODE_DELETED)
3618
+ LOCALIZED_ITEM_UPSERTED = 'localized_item_upserted' unless defined?(LOCALIZED_ITEM_UPSERTED)
3619
+ LOCALIZED_ITEM_DELETED = 'localized_item_deleted' unless defined?(LOCALIZED_ITEM_DELETED)
3618
3620
  end
3619
3621
 
3620
3622
  def initialize(incoming={})
@@ -3652,6 +3654,8 @@ module Io
3652
3654
  when Types::HS6_CODE_DELETED; Hs6CodeDeleted.new(hash)
3653
3655
  when Types::HS10_CODE_UPSERTED; Hs10CodeUpserted.new(hash)
3654
3656
  when Types::HS10_CODE_DELETED; Hs10CodeDeleted.new(hash)
3657
+ when Types::LOCALIZED_ITEM_UPSERTED; LocalizedItemUpserted.new(hash)
3658
+ when Types::LOCALIZED_ITEM_DELETED; LocalizedItemDeleted.new(hash)
3655
3659
  else EventUndefinedType.new(:name => union_type_name)
3656
3660
  end
3657
3661
  end
@@ -4325,7 +4329,7 @@ module Io
4325
4329
  end
4326
4330
 
4327
4331
  def EventType.ALL
4328
- @@all ||= [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.flow_currency_setting_deleted, EventType.flow_currency_setting_upserted, EventType.rate_deleted, EventType.rate_upserted, EventType.spot_rate_deleted, EventType.spot_rate_upserted, EventType.organization_currency_setting_deleted, EventType.organization_currency_setting_upserted, EventType.experience_deleted, EventType.experience_upserted, EventType.hs6_code_upserted, EventType.hs6_code_deleted, EventType.hs10_code_upserted, EventType.hs10_code_deleted]
4332
+ @@all ||= [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.flow_currency_setting_deleted, EventType.flow_currency_setting_upserted, EventType.rate_deleted, EventType.rate_upserted, EventType.spot_rate_deleted, EventType.spot_rate_upserted, EventType.organization_currency_setting_deleted, EventType.organization_currency_setting_upserted, EventType.experience_deleted, EventType.experience_upserted, EventType.hs6_code_upserted, EventType.hs6_code_deleted, EventType.hs10_code_upserted, EventType.hs10_code_deleted, EventType.localized_item_upserted, EventType.localized_item_deleted]
4329
4333
  end
4330
4334
 
4331
4335
  def EventType.catalog_upserted
@@ -4416,6 +4420,14 @@ module Io
4416
4420
  @@_hs10_code_deleted ||= EventType.new('hs10_code_deleted')
4417
4421
  end
4418
4422
 
4423
+ def EventType.localized_item_upserted
4424
+ @@_localized_item_upserted ||= EventType.new('localized_item_upserted')
4425
+ end
4426
+
4427
+ def EventType.localized_item_deleted
4428
+ @@_localized_item_deleted ||= EventType.new('localized_item_deleted')
4429
+ end
4430
+
4419
4431
  def to_hash
4420
4432
  value
4421
4433
  end
@@ -10550,7 +10562,7 @@ module Io
10550
10562
  # line items as you like - including repeating item numbers across line items.
10551
10563
  class LineItem
10552
10564
 
10553
- attr_reader :number, :quantity, :center, :discount
10565
+ attr_reader :number, :quantity, :center, :price, :discount
10554
10566
 
10555
10567
  def initialize(incoming={})
10556
10568
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -10558,6 +10570,7 @@ module Io
10558
10570
  @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
10559
10571
  @quantity = HttpClient::Preconditions.assert_class('quantity', opts.delete(:quantity), Integer)
10560
10572
  @center = (x = opts.delete(:center); x.nil? ? nil : HttpClient::Preconditions.assert_class('center', x, String))
10573
+ @price = (x = opts.delete(:price); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Money) ? x : ::Io::Flow::V0::Models::Money.new(x)))
10561
10574
  @discount = (x = opts.delete(:discount); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Money) ? x : ::Io::Flow::V0::Models::Money.new(x)))
10562
10575
  end
10563
10576
 
@@ -10574,6 +10587,7 @@ module Io
10574
10587
  :number => number,
10575
10588
  :quantity => quantity,
10576
10589
  :center => center,
10590
+ :price => price.nil? ? nil : price.to_hash,
10577
10591
  :discount => discount.nil? ? nil : discount.to_hash
10578
10592
  }
10579
10593
  end
@@ -10606,6 +10620,96 @@ module Io
10606
10620
 
10607
10621
  end
10608
10622
 
10623
+ class LocalizedItemDeleted < Event
10624
+
10625
+ attr_reader :event_id, :timestamp, :organization, :number, :catalog
10626
+
10627
+ def initialize(incoming={})
10628
+ super(:name => Event::Types::LOCALIZED_ITEM_DELETED)
10629
+ opts = HttpClient::Helper.symbolize_keys(incoming)
10630
+ HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :number, :catalog], 'LocalizedItemDeleted')
10631
+ @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
10632
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
10633
+ @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
10634
+ @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
10635
+ @catalog = HttpClient::Preconditions.assert_class('catalog', opts.delete(:catalog), String)
10636
+ end
10637
+
10638
+ def to_json
10639
+ JSON.dump(to_hash)
10640
+ end
10641
+
10642
+ def copy(incoming={})
10643
+ LocalizedItemDeleted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
10644
+ end
10645
+
10646
+ def subtype_to_hash
10647
+ {
10648
+ :event_id => event_id,
10649
+ :timestamp => timestamp,
10650
+ :organization => organization,
10651
+ :number => number,
10652
+ :catalog => catalog
10653
+ }
10654
+ end
10655
+
10656
+ end
10657
+
10658
+ class LocalizedItemUpserted < Event
10659
+
10660
+ attr_reader :event_id, :timestamp, :organization, :number, :catalog, :locale, :name, :currency, :price, :categories, :description, :attributes, :dimensions, :images, :local
10661
+
10662
+ def initialize(incoming={})
10663
+ super(:name => Event::Types::LOCALIZED_ITEM_UPSERTED)
10664
+ opts = HttpClient::Helper.symbolize_keys(incoming)
10665
+ HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :number, :catalog, :locale, :name, :currency, :price, :categories, :attributes, :dimensions, :images, :local], 'LocalizedItemUpserted')
10666
+ @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
10667
+ @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
10668
+ @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
10669
+ @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
10670
+ @catalog = HttpClient::Preconditions.assert_class('catalog', opts.delete(:catalog), String)
10671
+ @locale = HttpClient::Preconditions.assert_class('locale', opts.delete(:locale), String)
10672
+ @name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
10673
+ @currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
10674
+ @price = HttpClient::Preconditions.assert_class('price', opts.delete(:price), Numeric)
10675
+ @categories = HttpClient::Preconditions.assert_class('categories', opts.delete(:categories), Array).map { |v| HttpClient::Preconditions.assert_class('categories', v, String) }
10676
+ @description = (x = opts.delete(:description); x.nil? ? nil : HttpClient::Preconditions.assert_class('description', x, String))
10677
+ @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 }
10678
+ @dimensions = HttpClient::Preconditions.assert_class('dimensions', HttpClient::Helper.to_object(opts.delete(:dimensions)), Hash)
10679
+ @images = HttpClient::Preconditions.assert_class('images', opts.delete(:images), Array).map { |v| HttpClient::Preconditions.assert_class('images', HttpClient::Helper.to_object(v), Hash) }
10680
+ @local = HttpClient::Preconditions.assert_class('local', HttpClient::Helper.to_object(opts.delete(:local)), Hash)
10681
+ end
10682
+
10683
+ def to_json
10684
+ JSON.dump(to_hash)
10685
+ end
10686
+
10687
+ def copy(incoming={})
10688
+ LocalizedItemUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
10689
+ end
10690
+
10691
+ def subtype_to_hash
10692
+ {
10693
+ :event_id => event_id,
10694
+ :timestamp => timestamp,
10695
+ :organization => organization,
10696
+ :number => number,
10697
+ :catalog => catalog,
10698
+ :locale => locale,
10699
+ :name => name,
10700
+ :currency => currency,
10701
+ :price => price,
10702
+ :categories => categories,
10703
+ :description => description,
10704
+ :attributes => attributes,
10705
+ :dimensions => dimensions,
10706
+ :images => images,
10707
+ :local => local
10708
+ }
10709
+ end
10710
+
10711
+ end
10712
+
10609
10713
  class LocalizedPrice
10610
10714
 
10611
10715
  attr_reader :key, :currency, :amount, :label
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.0.34
4
+ version: 0.0.35
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: 2016-08-17 00:00:00.000000000 Z
11
+ date: 2016-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json