flowcommerce-reference 0.4.6 → 0.4.7

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: 07e66a8ca76c8d12e8b7e059d3fe52b7a20ae2dc
4
- data.tar.gz: b1e36c50ad4cfbe601526af2ef601fdc7725fdb3
3
+ metadata.gz: eb99e4b712885116c8040362fc102a5315e74e18
4
+ data.tar.gz: dfd2e03d2e3402a5efee532286973c950be8e2d1
5
5
  SHA512:
6
- metadata.gz: 968ba7095bf8c6200993a32289cb76e07d2d46d97ddc51181e14aa9cb20fb39182a0fb5febae639f3c1bc7f4e6b0b3c03c6151c34c2a5fe3a43d7c5f662f4574
7
- data.tar.gz: f2a76ec31d4335b88e25ccd45c389641a49c20c0422bbc0425262907566e84c9decde3b9dda30702c301716a6e54bcdc78a716858c463a1727f467fcebac02ea
6
+ metadata.gz: 79bf35a9fcba485437cbc45304ea3c7d2047e80c2b68d21232b6c589305430ce57a329b01717f3ab104129abfa182928aab815df0bd83226fd09990e070fb8b7
7
+ data.tar.gz: 423dd419509c3cc24bea865ebce56161956cd0c33a411fa36513737ce65eac99cde63e79767ff0cf0a68f6230d517f0f560fa9716addcd5dd2a8e1e1c782bd0a
@@ -1,6 +1,6 @@
1
1
  # Generated by API Builder - https://www.apibuilder.io
2
- # Service version: 0.5.43
3
- # apibuilder 0.14.3 app.apibuilder.io/flow/reference/0.5.43/ruby_client
2
+ # Service version: 0.6.70
3
+ # apibuilder 0.14.3 app.apibuilder.io/flow/reference/0.6.70/ruby_client
4
4
 
5
5
  require 'cgi'
6
6
  require 'net/http'
@@ -26,8 +26,8 @@ module Io
26
26
 
27
27
  BASE_URL = 'https://api.flow.io' unless defined?(Constants::BASE_URL)
28
28
  NAMESPACE = 'io.flow.reference.v0' unless defined?(Constants::NAMESPACE)
29
- USER_AGENT = 'apibuilder 0.14.3 app.apibuilder.io/flow/reference/0.5.43/ruby_client' unless defined?(Constants::USER_AGENT)
30
- VERSION = '0.5.43' unless defined?(Constants::VERSION)
29
+ USER_AGENT = 'apibuilder 0.14.3 app.apibuilder.io/flow/reference/0.6.70/ruby_client' unless defined?(Constants::USER_AGENT)
30
+ VERSION = '0.6.70' unless defined?(Constants::VERSION)
31
31
  VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
32
32
 
33
33
  end
@@ -472,7 +472,7 @@ module Io
472
472
  # upper case ISO code. See https://api.flow.io/reference/countries
473
473
  class Country
474
474
 
475
- attr_reader :name, :iso_3166_2, :iso_3166_3, :languages, :measurement_system, :default_currency, :timezones, :default_delivered_duty
475
+ attr_reader :name, :iso_3166_2, :iso_3166_3, :languages, :measurement_system, :default_currency, :default_language, :timezones, :default_delivered_duty
476
476
 
477
477
  def initialize(incoming={})
478
478
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -483,6 +483,7 @@ module Io
483
483
  @languages = HttpClient::Preconditions.assert_class('languages', opts.delete(:languages), Array).map { |v| HttpClient::Preconditions.assert_class('languages', v, String) }
484
484
  @measurement_system = HttpClient::Preconditions.assert_class('measurement_system', opts.delete(:measurement_system), String)
485
485
  @default_currency = (x = opts.delete(:default_currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('default_currency', x, String))
486
+ @default_language = (x = opts.delete(:default_language); x.nil? ? nil : HttpClient::Preconditions.assert_class('default_language', x, String))
486
487
  @timezones = HttpClient::Preconditions.assert_class('timezones', opts.delete(:timezones), Array).map { |v| HttpClient::Preconditions.assert_class('timezones', v, String) }
487
488
  @default_delivered_duty = (x = opts.delete(:default_delivered_duty); x.nil? ? nil : HttpClient::Preconditions.assert_class('default_delivered_duty', x, String))
488
489
  end
@@ -503,6 +504,7 @@ module Io
503
504
  :languages => languages,
504
505
  :measurement_system => measurement_system,
505
506
  :default_currency => default_currency,
507
+ :default_language => default_language,
506
508
  :timezones => timezones,
507
509
  :default_delivered_duty => default_delivered_duty
508
510
  }
@@ -102,13 +102,7 @@ end
102
102
  module Io::Flow::Reference::V0::Models
103
103
  class Currency
104
104
  def to_cents(amount_in)
105
- amount = amount_in.to_f
106
-
107
- if number_decimals > 0
108
- (amount * (10**number_decimals)).round(0)
109
- else
110
- amount.to_i
111
- end
105
+ (amount_in * (10**number_decimals)).round(0)
112
106
  end
113
107
  end
114
108
 
@@ -29,27 +29,27 @@ module FlowCommerce
29
29
  end
30
30
 
31
31
  def Afr
32
- new_c({"name":"Africa","code":"AFR","countries":["AGO","BEN","BFA","BWA","CAF","CIV","CMR","COG","COM","CPV","DJI","DZA","EGY","ETH","GAB","GHA","GIN","GMB","GNB","GNQ","KEN","LBY","LSO","MAR","MDG","MLI","MOZ","MRT","MUS","MWI","MYT","NAM","NER","NGA","REU","RWA","SEN","SHN","SLE","SOM","SSD","STP","SWZ","SYC","TCD","TGO","TZA","UGA","ZAF","ZMB"]})
32
+ new_c({"name":"Africa","code":"AFR","countries":["AGO","BDI","BEN","BFA","BWA","CAF","CIV","CMR","COD","COG","COM","CPV","DJI","DZA","EGY","ERI","ESH","ETH","GAB","GHA","GIN","GMB","GNB","GNQ","KEN","LBR","LBY","LSO","MAR","MDG","MLI","MOZ","MRT","MUS","MWI","MYT","NAM","NER","NGA","REU","RWA","SDN","SEN","SHN","SLE","SOM","SSD","STP","SWZ","SYC","TCD","TGO","TUN","TZA","UGA","ZAF","ZMB","ZWE"]})
33
33
  end
34
34
 
35
35
  def Ant
36
- new_c({"name":"Antarctica","code":"ANT","countries":null})
36
+ new_c({"name":"Antarctica","code":"ANT","countries":["ATA","ATF","BVT","HMD","SGS"]})
37
37
  end
38
38
 
39
39
  def Asi
40
- new_c({"name":"Asia","code":"ASI","countries":["ARE","ARM","AZE","BGD","BHR","BRN","BTN","CHN","GEO","HKG","IDN","IND","ISR","JOR","JPN","KAZ","KGZ","KHM","KOR","KWT","LAO","LBN","LKA","MAC","MDV","MNG","MYS","NPL","OMN","PAK","PHL","PRK","QAT","SAU","SGP","THA","TJK","TKM","TUR","TWN","UZB","VNM","YEM"]})
40
+ new_c({"name":"Asia","code":"ASI","countries":["AFG","ARE","ARM","AZE","BGD","BHR","BRN","BTN","CCK","CHN","GEO","HKG","IDN","IND","IOT","IRN","IRQ","ISR","JOR","JPN","KAZ","KGZ","KHM","KOR","KWT","LAO","LBN","LKA","MAC","MDV","MMR","MNG","MYS","NPL","OMN","PAK","PHL","PRK","PSE","QAT","SAU","SGP","SYR","THA","TJK","TKM","TUR","TWN","UZB","VNM","YEM"]})
41
41
  end
42
42
 
43
43
  def Eur
44
- new_c({"name":"Europe","code":"EUR","countries":["ALB","AND","AUT","BEL","BGR","BIH","CHE","CYP","CZE","DEU","DNK","ESP","EST","FIN","FRA","FRO","GBR","GGY","GIB","GRC","HRV","HUN","IRL","ISL","ITA","JEY","LIE","LTU","LUX","LVA","MCO","MDA","MLT","MNE","NLD","NOR","POL","PRT","ROU","RUS","SMR","SRB","SVK","SVN","SWE","UKR"]})
44
+ new_c({"name":"Europe","code":"EUR","countries":["ALA","ALB","AND","AUT","BEL","BGR","BIH","BLR","CHE","CYP","CZE","DEU","DNK","ESP","EST","FIN","FRA","FRO","GBR","GGY","GIB","GRC","HRV","HUN","IMN","IRL","ISL","ITA","JEY","LIE","LTU","LUX","LVA","MCO","MDA","MKD","MLT","MNE","NLD","NOR","POL","PRT","ROU","RUS","SJM","SMR","SRB","SVK","SVN","SWE","UKR","VAT"]})
45
45
  end
46
46
 
47
47
  def Noa
48
- new_c({"name":"North America","code":"NOA","countries":["ABW","AIA","ATG","BES","BHS","BLM","BLZ","BMU","BRB","CAN","CRI","CUW","CYM","DMA","DOM","GLP","GRD","GRL","GTM","HND","HTI","JAM","KNA","LCA","MAF","MEX","MSR","MTQ","NIC","PAN","SLV","SPM","SXM","TCA","TTO","USA","VCT","VGB"]})
48
+ new_c({"name":"North America","code":"NOA","countries":["ABW","AIA","ATG","BES","BHS","BLM","BLZ","BMU","BRB","CAN","CRI","CUB","CUW","CYM","DMA","DOM","GLP","GRD","GRL","GTM","HND","HTI","JAM","KNA","LCA","MAF","MEX","MSR","MTQ","NIC","PAN","PRI","SLV","SPM","SXM","TCA","TTO","USA","VCT","VGB","VIR"]})
49
49
  end
50
50
 
51
51
  def Oce
52
- new_c({"name":"Oceania","code":"OCE","countries":["ASM","AUS","COK","FJI","FSM","GUM","KIR","MHL","MNP","NCL","NIU","NRU","NZL","PLW","PNG","PYF","SLB","TLS","TON","TUV","VUT","WLF","WSM"]})
52
+ new_c({"name":"Oceania","code":"OCE","countries":["ASM","AUS","COK","CXR","FJI","FSM","GUM","KIR","MHL","MNP","NCL","NFK","NIU","NRU","NZL","PCN","PLW","PNG","PYF","SLB","TKL","TLS","TON","TUV","UMI","VUT","WLF","WSM"]})
53
53
  end
54
54
 
55
55
  def Soa