flowcommerce 0.0.21 → 0.0.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/flow_commerce/flow_api_v0_client.rb +53 -23
- 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: ca499ee693efdc71a8cead7daf2d54c6b964eaf8
|
4
|
+
data.tar.gz: 3f4de27a4edbc09df06c2c4340385e51afa97ec8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9df3b57af4a45821c74e51e20e95f73531350db1b850a175bf2542c3c64d590d3fa287902d6d898ec8194dd30ff371089829a612311b89f72b55690dbe2deea
|
7
|
+
data.tar.gz: ab2c3588cbc691ef24ad8004de19312ddd4af3f6fb5740ad47a985ad4e019511b8fb48b3b316221a5aaef20f6e95e8355ca04886d0f0ce8508f1b185382e0a19
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# Generated by apidoc - http://www.apidoc.me
|
2
|
-
# Service version: 0.0.
|
3
|
-
# apidoc:0.11.33 http://www.apidoc.me/flow/api/0.0.
|
2
|
+
# Service version: 0.0.65
|
3
|
+
# apidoc:0.11.33 http://www.apidoc.me/flow/api/0.0.65/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.0.
|
29
|
-
VERSION = '0.0.
|
28
|
+
USER_AGENT = 'apidoc:0.11.33 http://www.apidoc.me/flow/api/0.0.65/ruby_client' unless defined?(Constants::USER_AGENT)
|
29
|
+
VERSION = '0.0.65' unless defined?(Constants::VERSION)
|
30
30
|
VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
|
31
31
|
|
32
32
|
end
|
@@ -2309,6 +2309,7 @@ module Io
|
|
2309
2309
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
2310
2310
|
query = {
|
2311
2311
|
:id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
|
2312
|
+
:experience => (x = opts.delete(:experience); x.nil? ? nil : HttpClient::Preconditions.assert_class('experience', x, String)),
|
2312
2313
|
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
2313
2314
|
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
2314
2315
|
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "name" : x), String)
|
@@ -3949,17 +3950,23 @@ module Io
|
|
3949
3950
|
end
|
3950
3951
|
|
3951
3952
|
def DeliveredDuty.ALL
|
3952
|
-
@@all ||= [DeliveredDuty.paid, DeliveredDuty.unpaid]
|
3953
|
+
@@all ||= [DeliveredDuty.paid, DeliveredDuty.unpaid, DeliveredDuty.choice]
|
3953
3954
|
end
|
3954
3955
|
|
3956
|
+
# DDP
|
3955
3957
|
def DeliveredDuty.paid
|
3956
3958
|
@@_paid ||= DeliveredDuty.new('paid')
|
3957
3959
|
end
|
3958
3960
|
|
3961
|
+
# DDU
|
3959
3962
|
def DeliveredDuty.unpaid
|
3960
3963
|
@@_unpaid ||= DeliveredDuty.new('unpaid')
|
3961
3964
|
end
|
3962
3965
|
|
3966
|
+
def DeliveredDuty.choice
|
3967
|
+
@@_choice ||= DeliveredDuty.new('choice')
|
3968
|
+
end
|
3969
|
+
|
3963
3970
|
def to_hash
|
3964
3971
|
value
|
3965
3972
|
end
|
@@ -6841,13 +6848,14 @@ module Io
|
|
6841
6848
|
# range and cost
|
6842
6849
|
class DeliveryOption
|
6843
6850
|
|
6844
|
-
attr_reader :id, :cost, :price, :service, :tier, :window
|
6851
|
+
attr_reader :id, :cost, :delivered_duty, :price, :service, :tier, :window
|
6845
6852
|
|
6846
6853
|
def initialize(incoming={})
|
6847
6854
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
6848
|
-
HttpClient::Preconditions.require_keys(opts, [:id, :cost, :price, :service, :tier, :window], 'DeliveryOption')
|
6855
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :cost, :delivered_duty, :price, :service, :tier, :window], 'DeliveryOption')
|
6849
6856
|
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
6850
6857
|
@cost = (x = opts.delete(:cost); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x))
|
6858
|
+
@delivered_duty = (x = opts.delete(:delivered_duty); x.is_a?(::Io::Flow::V0::Models::DeliveredDuty) ? x : ::Io::Flow::V0::Models::DeliveredDuty.apply(x))
|
6851
6859
|
@price = (x = opts.delete(:price); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x))
|
6852
6860
|
@service = (x = opts.delete(:service); x.is_a?(::Io::Flow::V0::Models::ServiceSummary) ? x : ::Io::Flow::V0::Models::ServiceSummary.new(x))
|
6853
6861
|
@tier = (x = opts.delete(:tier); x.is_a?(::Io::Flow::V0::Models::TierReference) ? x : ::Io::Flow::V0::Models::TierReference.new(x))
|
@@ -6866,6 +6874,7 @@ module Io
|
|
6866
6874
|
{
|
6867
6875
|
:id => id,
|
6868
6876
|
:cost => cost.to_hash,
|
6877
|
+
:delivered_duty => delivered_duty.value,
|
6869
6878
|
:price => price.to_hash,
|
6870
6879
|
:service => service.to_hash,
|
6871
6880
|
:tier => tier.to_hash,
|
@@ -6935,13 +6944,14 @@ module Io
|
|
6935
6944
|
|
6936
6945
|
class DeliveryOptionSummary
|
6937
6946
|
|
6938
|
-
attr_reader :id, :cost, :price, :service, :tier, :window
|
6947
|
+
attr_reader :id, :cost, :delivered_duty, :price, :service, :tier, :window
|
6939
6948
|
|
6940
6949
|
def initialize(incoming={})
|
6941
6950
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
6942
|
-
HttpClient::Preconditions.require_keys(opts, [:id, :cost, :price, :service, :tier, :window], 'DeliveryOptionSummary')
|
6951
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :cost, :delivered_duty, :price, :service, :tier, :window], 'DeliveryOptionSummary')
|
6943
6952
|
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
6944
6953
|
@cost = (x = opts.delete(:cost); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x))
|
6954
|
+
@delivered_duty = (x = opts.delete(:delivered_duty); x.is_a?(::Io::Flow::V0::Models::DeliveredDuty) ? x : ::Io::Flow::V0::Models::DeliveredDuty.apply(x))
|
6945
6955
|
@price = (x = opts.delete(:price); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x))
|
6946
6956
|
@service = (x = opts.delete(:service); x.is_a?(::Io::Flow::V0::Models::ServiceReference) ? x : ::Io::Flow::V0::Models::ServiceReference.new(x))
|
6947
6957
|
@tier = (x = opts.delete(:tier); x.is_a?(::Io::Flow::V0::Models::TierReference) ? x : ::Io::Flow::V0::Models::TierReference.new(x))
|
@@ -6960,6 +6970,7 @@ module Io
|
|
6960
6970
|
{
|
6961
6971
|
:id => id,
|
6962
6972
|
:cost => cost.to_hash,
|
6973
|
+
:delivered_duty => delivered_duty.value,
|
6963
6974
|
:price => price.to_hash,
|
6964
6975
|
:service => service.to_hash,
|
6965
6976
|
:tier => tier.to_hash,
|
@@ -7361,15 +7372,14 @@ module Io
|
|
7361
7372
|
|
7362
7373
|
end
|
7363
7374
|
|
7364
|
-
#
|
7365
|
-
# region
|
7375
|
+
# Experiences define a local experience for a given geographic region
|
7366
7376
|
class Experience
|
7367
7377
|
|
7368
|
-
attr_reader :id, :key, :region, :country, :currency, :language, :measurement_system, :name, :subcatalog, :price_display
|
7378
|
+
attr_reader :id, :key, :region, :country, :currency, :language, :measurement_system, :name, :subcatalog, :price_display, :position
|
7369
7379
|
|
7370
7380
|
def initialize(incoming={})
|
7371
7381
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
7372
|
-
HttpClient::Preconditions.require_keys(opts, [:id, :key, :region, :country, :currency, :language, :measurement_system, :name, :subcatalog, :price_display], 'Experience')
|
7382
|
+
HttpClient::Preconditions.require_keys(opts, [:id, :key, :region, :country, :currency, :language, :measurement_system, :name, :subcatalog, :price_display, :position], 'Experience')
|
7373
7383
|
@id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
|
7374
7384
|
@key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
|
7375
7385
|
@region = (x = opts.delete(:region); x.is_a?(::Io::Flow::V0::Models::RegionReference) ? x : ::Io::Flow::V0::Models::RegionReference.new(x))
|
@@ -7380,6 +7390,7 @@ module Io
|
|
7380
7390
|
@name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
|
7381
7391
|
@subcatalog = (x = opts.delete(:subcatalog); x.is_a?(::Io::Flow::V0::Models::SubcatalogReference) ? x : ::Io::Flow::V0::Models::SubcatalogReference.new(x))
|
7382
7392
|
@price_display = (x = opts.delete(:price_display); x.is_a?(::Io::Flow::V0::Models::PriceDisplay) ? x : ::Io::Flow::V0::Models::PriceDisplay.new(x))
|
7393
|
+
@position = HttpClient::Preconditions.assert_class('position', opts.delete(:position), Integer)
|
7383
7394
|
end
|
7384
7395
|
|
7385
7396
|
def to_json
|
@@ -7401,16 +7412,17 @@ module Io
|
|
7401
7412
|
:measurement_system => measurement_system.value,
|
7402
7413
|
:name => name,
|
7403
7414
|
:subcatalog => subcatalog.to_hash,
|
7404
|
-
:price_display => price_display.to_hash
|
7415
|
+
:price_display => price_display.to_hash,
|
7416
|
+
:position => position
|
7405
7417
|
}
|
7406
7418
|
end
|
7407
7419
|
|
7408
7420
|
end
|
7409
7421
|
|
7410
|
-
#
|
7422
|
+
# Experiences define a local experience for a given geographic region
|
7411
7423
|
class ExperienceForm
|
7412
7424
|
|
7413
|
-
attr_reader :region_id, :name, :country, :currency, :language, :key, :measurement_system, :subcatalog_id
|
7425
|
+
attr_reader :region_id, :name, :country, :currency, :language, :key, :measurement_system, :subcatalog_id, :position
|
7414
7426
|
|
7415
7427
|
def initialize(incoming={})
|
7416
7428
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
@@ -7423,6 +7435,7 @@ module Io
|
|
7423
7435
|
@key = (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, String))
|
7424
7436
|
@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)))
|
7425
7437
|
@subcatalog_id = (x = opts.delete(:subcatalog_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('subcatalog_id', x, String))
|
7438
|
+
@position = (x = opts.delete(:position); x.nil? ? nil : HttpClient::Preconditions.assert_class('position', x, Integer))
|
7426
7439
|
end
|
7427
7440
|
|
7428
7441
|
def to_json
|
@@ -7442,7 +7455,8 @@ module Io
|
|
7442
7455
|
:language => language,
|
7443
7456
|
:key => key,
|
7444
7457
|
:measurement_system => measurement_system.nil? ? nil : measurement_system.value,
|
7445
|
-
:subcatalog_id => subcatalog_id
|
7458
|
+
:subcatalog_id => subcatalog_id,
|
7459
|
+
:position => position
|
7446
7460
|
}
|
7447
7461
|
end
|
7448
7462
|
|
@@ -7653,8 +7667,15 @@ module Io
|
|
7653
7667
|
|
7654
7668
|
end
|
7655
7669
|
|
7656
|
-
#
|
7657
|
-
#
|
7670
|
+
# Functions are used to calculate the localized price of an additional item
|
7671
|
+
# based on settings (e.g. include VAT) and any rules (adding margin, rounding,
|
7672
|
+
# etc.). Each function can be associated with an optional query identifying the
|
7673
|
+
# products to which the function applies. Flow selects the first function
|
7674
|
+
# matching an item, then uses that function to calculate local prices whenever
|
7675
|
+
# any data relevant to the item changes (e.g. on update in master catalog, on
|
7676
|
+
# change in relevant exchange rate, etc.). Ultimately the function executes in
|
7677
|
+
# pure javascript (the 'code' field) - allowing you to create fully custom
|
7678
|
+
# functions if needed.
|
7658
7679
|
class Function < ExpandableFunction
|
7659
7680
|
|
7660
7681
|
attr_reader :id, :subcatalog_id, :key, :name, :position, :presets, :code, :q
|
@@ -7696,19 +7717,28 @@ module Io
|
|
7696
7717
|
|
7697
7718
|
end
|
7698
7719
|
|
7720
|
+
# Functions are used to calculate the localized price of an additional item
|
7721
|
+
# based on settings (e.g. include VAT) and any rules (adding margin, rounding,
|
7722
|
+
# etc.). Each function can be associated with an optional query identifying the
|
7723
|
+
# products to which the function applies. Flow selects the first function
|
7724
|
+
# matching an item, then uses that function to calculate local prices whenever
|
7725
|
+
# any data relevant to the item changes (e.g. on update in master catalog, on
|
7726
|
+
# change in relevant exchange rate, etc.). Ultimately the function executes in
|
7727
|
+
# pure javascript (the 'code' field) - allowing you to create fully custom
|
7728
|
+
# functions if needed.
|
7699
7729
|
class FunctionForm
|
7700
7730
|
|
7701
7731
|
attr_reader :name, :subcatalog_id, :q, :presets, :code, :position
|
7702
7732
|
|
7703
7733
|
def initialize(incoming={})
|
7704
7734
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
7705
|
-
HttpClient::Preconditions.require_keys(opts, [:name, :subcatalog_id], 'FunctionForm')
|
7735
|
+
HttpClient::Preconditions.require_keys(opts, [:name, :subcatalog_id, :position], 'FunctionForm')
|
7706
7736
|
@name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
|
7707
7737
|
@subcatalog_id = HttpClient::Preconditions.assert_class('subcatalog_id', opts.delete(:subcatalog_id), String)
|
7708
7738
|
@q = (x = opts.delete(:q); x.nil? ? nil : HttpClient::Preconditions.assert_class('q', x, String))
|
7709
7739
|
@presets = (x = opts.delete(:presets); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Presets) ? x : ::Io::Flow::V0::Models::Presets.new(x)))
|
7710
7740
|
@code = (x = opts.delete(:code); x.nil? ? nil : HttpClient::Preconditions.assert_class('code', x, String))
|
7711
|
-
@position =
|
7741
|
+
@position = HttpClient::Preconditions.assert_class('position', opts.delete(:position), Integer)
|
7712
7742
|
end
|
7713
7743
|
|
7714
7744
|
def to_json
|
@@ -12081,8 +12111,8 @@ module Io
|
|
12081
12111
|
|
12082
12112
|
def initialize(incoming={})
|
12083
12113
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
12084
|
-
HttpClient::Preconditions.require_keys(opts, [:
|
12085
|
-
@position = HttpClient::Preconditions.assert_class('position',
|
12114
|
+
HttpClient::Preconditions.require_keys(opts, [:query, :outcome], 'TierRuleForm')
|
12115
|
+
@position = (x = opts.delete(:position); x.nil? ? nil : HttpClient::Preconditions.assert_class('position', x, Integer))
|
12086
12116
|
@query = HttpClient::Preconditions.assert_class('query', opts.delete(:query), String)
|
12087
12117
|
@outcome = (x = opts.delete(:outcome); x.is_a?(::Io::Flow::V0::Models::TierRuleOutcome) ? x : ::Io::Flow::V0::Models::TierRuleOutcome.from_json(x))
|
12088
12118
|
end
|
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.
|
4
|
+
version: 0.0.22
|
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-
|
11
|
+
date: 2016-08-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|