flowcommerce 0.0.87 → 0.0.88

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: d5fac48369c61fc9a60552e2754894a106256617
4
- data.tar.gz: 8b1573907021b84afa6b144dbd861d88cd8732eb
3
+ metadata.gz: 1e8906339be42022d0f7afa19d3c2a949f883955
4
+ data.tar.gz: b3f93c59547595171b52e9aa50409b4ec5e424f5
5
5
  SHA512:
6
- metadata.gz: 4c026465e1c8ebff77cf2f483891f3670d15e6773e717ac6fc75720c18aade054d340a48d1a5a3c22cc45340e06cebbb06089c2835c7bc3c5a23605325a9891c
7
- data.tar.gz: 334f04673e16531a7b40f88a34cb162a9d10eb4c314d935b9fac4f88bbd5e2085a9c79bf943b645462d60f23073c260accf7b9d1139e3686984cf278eabc77bf
6
+ metadata.gz: d118da0af7c27aef2171759669dd461a20ee37665b076cceacfe8898406fcfc2d121a7f8ef2b3bb7f8de750392406ed4db46836f865ff93c544a53ee27d3bc3b
7
+ data.tar.gz: b0af462b5138a7ebe00ee3745a6050a7c4ebb16cdbdb48524f7b563dfed5be5694375ae9945f38894539422558b0c1e369db2f77ba60622b5e09d16dd170a761
@@ -1,6 +1,6 @@
1
1
  # Generated by apidoc - http://www.apidoc.me
2
2
  # Service version: 0.1.77
3
- # apidoc:0.11.49 http://www.apidoc.me/flow/api/0.1.96/ruby_client
3
+ # apidoc:0.11.49 http://www.apidoc.me/flow/api/0.1.97/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 = 'apidoc:0.11.49 http://www.apidoc.me/flow/api/0.1.96/ruby_client' unless defined?(Constants::USER_AGENT)
28
+ USER_AGENT = 'apidoc:0.11.49 http://www.apidoc.me/flow/api/0.1.97/ruby_client' unless defined?(Constants::USER_AGENT)
29
29
  VERSION = '0.1.77' unless defined?(Constants::VERSION)
30
30
  VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
31
31
 
@@ -4809,6 +4809,52 @@ module Io
4809
4809
 
4810
4810
  end
4811
4811
 
4812
+ class AdjustmentReasonKey
4813
+
4814
+ attr_reader :value
4815
+
4816
+ def initialize(value)
4817
+ @value = HttpClient::Preconditions.assert_class('value', value, String)
4818
+ end
4819
+
4820
+ # Returns the instance of AdjustmentReasonKey for this value, creating a new instance for an unknown value
4821
+ def AdjustmentReasonKey.apply(value)
4822
+ if value.instance_of?(AdjustmentReasonKey)
4823
+ value
4824
+ else
4825
+ HttpClient::Preconditions.assert_class_or_nil('value', value, String)
4826
+ value.nil? ? nil : (from_string(value) || AdjustmentReasonKey.new(value))
4827
+ end
4828
+ end
4829
+
4830
+ # Returns the instance of AdjustmentReasonKey for this value, or nil if not found
4831
+ def AdjustmentReasonKey.from_string(value)
4832
+ HttpClient::Preconditions.assert_class('value', value, String)
4833
+ AdjustmentReasonKey.ALL.find { |v| v.value == value }
4834
+ end
4835
+
4836
+ def AdjustmentReasonKey.ALL
4837
+ @@all ||= [AdjustmentReasonKey.duty_deminimus, AdjustmentReasonKey.tax_deminimus]
4838
+ end
4839
+
4840
+ # If the duty deminimus value has not been met, an adjustment may be made to
4841
+ # offset any previously calculated duty.
4842
+ def AdjustmentReasonKey.duty_deminimus
4843
+ @@_duty_deminimus ||= AdjustmentReasonKey.new('duty_deminimus')
4844
+ end
4845
+
4846
+ # If the tax deminimus value has not been met, an adjustment may be made to
4847
+ # offset any previously calculated tax.
4848
+ def AdjustmentReasonKey.tax_deminimus
4849
+ @@_tax_deminimus ||= AdjustmentReasonKey.new('tax_deminimus')
4850
+ end
4851
+
4852
+ def to_hash
4853
+ value
4854
+ end
4855
+
4856
+ end
4857
+
4812
4858
  class AuthorizationDeclineCode
4813
4859
 
4814
4860
  attr_reader :value
@@ -7584,6 +7630,34 @@ module Io
7584
7630
 
7585
7631
  end
7586
7632
 
7633
+ class AdjustmentReason
7634
+
7635
+ attr_reader :key, :label
7636
+
7637
+ def initialize(incoming={})
7638
+ opts = HttpClient::Helper.symbolize_keys(incoming)
7639
+ HttpClient::Preconditions.require_keys(opts, [:key, :label], 'AdjustmentReason')
7640
+ @key = (x = opts.delete(:key); x.is_a?(::Io::Flow::V0::Models::AdjustmentReasonKey) ? x : ::Io::Flow::V0::Models::AdjustmentReasonKey.apply(x))
7641
+ @label = HttpClient::Preconditions.assert_class('label', opts.delete(:label), String)
7642
+ end
7643
+
7644
+ def to_json
7645
+ JSON.dump(to_hash)
7646
+ end
7647
+
7648
+ def copy(incoming={})
7649
+ AdjustmentReason.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
7650
+ end
7651
+
7652
+ def to_hash
7653
+ {
7654
+ :key => key.value,
7655
+ :label => label
7656
+ }
7657
+ end
7658
+
7659
+ end
7660
+
7587
7661
  # Rule outcome where shipping surfaced in quote is actual cost plus a predefined
7588
7662
  # margin price
7589
7663
  class AmountMargin < TierRuleOutcome
@@ -13102,6 +13176,40 @@ module Io
13102
13176
 
13103
13177
  end
13104
13178
 
13179
+ class LocalizedAdjustment
13180
+
13181
+ attr_reader :currency, :amount, :label, :base, :reason
13182
+
13183
+ def initialize(incoming={})
13184
+ opts = HttpClient::Helper.symbolize_keys(incoming)
13185
+ HttpClient::Preconditions.require_keys(opts, [:currency, :amount, :label, :base, :reason], 'LocalizedAdjustment')
13186
+ @currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
13187
+ @amount = HttpClient::Preconditions.assert_class('amount', opts.delete(:amount), Numeric)
13188
+ @label = HttpClient::Preconditions.assert_class('label', opts.delete(:label), String)
13189
+ @base = (x = opts.delete(:base); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x))
13190
+ @reason = (x = opts.delete(:reason); x.is_a?(::Io::Flow::V0::Models::AdjustmentReason) ? x : ::Io::Flow::V0::Models::AdjustmentReason.new(x))
13191
+ end
13192
+
13193
+ def to_json
13194
+ JSON.dump(to_hash)
13195
+ end
13196
+
13197
+ def copy(incoming={})
13198
+ LocalizedAdjustment.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
13199
+ end
13200
+
13201
+ def to_hash
13202
+ {
13203
+ :currency => currency,
13204
+ :amount => amount,
13205
+ :label => label,
13206
+ :base => base.to_hash,
13207
+ :reason => reason.to_hash
13208
+ }
13209
+ end
13210
+
13211
+ end
13212
+
13105
13213
  class LocalizedItemDeleted < Event
13106
13214
 
13107
13215
  attr_reader :event_id, :timestamp, :organization, :number, :catalog
@@ -13139,7 +13247,7 @@ module Io
13139
13247
 
13140
13248
  class LocalizedItemDuty < LocalizedPrice
13141
13249
 
13142
- attr_reader :currency, :amount, :label, :base
13250
+ attr_reader :currency, :amount, :label, :base, :adjustment
13143
13251
 
13144
13252
  def initialize(incoming={})
13145
13253
  super(:name => LocalizedPrice::Types::LOCALIZED_ITEM_DUTY)
@@ -13149,6 +13257,7 @@ module Io
13149
13257
  @amount = HttpClient::Preconditions.assert_class('amount', opts.delete(:amount), Numeric)
13150
13258
  @label = HttpClient::Preconditions.assert_class('label', opts.delete(:label), String)
13151
13259
  @base = (x = opts.delete(:base); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x))
13260
+ @adjustment = (x = opts.delete(:adjustment); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::LocalizedAdjustment) ? x : ::Io::Flow::V0::Models::LocalizedAdjustment.new(x)))
13152
13261
  end
13153
13262
 
13154
13263
  def to_json
@@ -13164,7 +13273,8 @@ module Io
13164
13273
  :currency => currency,
13165
13274
  :amount => amount,
13166
13275
  :label => label,
13167
- :base => base.to_hash
13276
+ :base => base.to_hash,
13277
+ :adjustment => adjustment.nil? ? nil : adjustment.to_hash
13168
13278
  }
13169
13279
  end
13170
13280
 
@@ -13297,7 +13407,7 @@ module Io
13297
13407
 
13298
13408
  class LocalizedItemVat < LocalizedPrice
13299
13409
 
13300
- attr_reader :currency, :amount, :label, :base, :name
13410
+ attr_reader :currency, :amount, :label, :base, :name, :adjustment
13301
13411
 
13302
13412
  def initialize(incoming={})
13303
13413
  super(:name => LocalizedPrice::Types::LOCALIZED_ITEM_VAT)
@@ -13308,6 +13418,7 @@ module Io
13308
13418
  @label = HttpClient::Preconditions.assert_class('label', opts.delete(:label), String)
13309
13419
  @base = (x = opts.delete(:base); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x))
13310
13420
  @name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
13421
+ @adjustment = (x = opts.delete(:adjustment); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::LocalizedAdjustment) ? x : ::Io::Flow::V0::Models::LocalizedAdjustment.new(x)))
13311
13422
  end
13312
13423
 
13313
13424
  def to_json
@@ -13324,7 +13435,8 @@ module Io
13324
13435
  :amount => amount,
13325
13436
  :label => label,
13326
13437
  :base => base.to_hash,
13327
- :name => name
13438
+ :name => name,
13439
+ :adjustment => adjustment.nil? ? nil : adjustment.to_hash
13328
13440
  }
13329
13441
  end
13330
13442
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flowcommerce
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.87
4
+ version: 0.0.88
5
5
  platform: ruby
6
6
  authors:
7
7
  - Flow Commerce, Inc.