flowcommerce 0.0.37 → 0.0.38

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: bc545183d957a7e6192c44e19893081674206952
4
- data.tar.gz: 5b64383fadfdf0ad48a3e2c36f47cc616af4ba18
3
+ metadata.gz: 2f4c933ac465ee82d88a896af3d0227873c8b132
4
+ data.tar.gz: a6762a475e5e893bc08b0a03df3a1173b11d452b
5
5
  SHA512:
6
- metadata.gz: a03d75af24a4c0eb6244ecc3bcbb8c95423e5c5b6910d183f566a0c3a68453725d445470c15eaabecb0900e070a491d79e1cfe02048dd08911a663aac2252ce8
7
- data.tar.gz: ec40aab28cd35b086022b1f7d9771ae2fcec0fbbf1b53e43ba974106f1babae16ee8207ea3f5604ec4a177c44628cbfc92261e68967558168e00c5d0f0cd6bd2
6
+ metadata.gz: df3a26e4f1edbba2aad4bfcc0483befb11349777c5ed1710d01bc6dfd943c8b149a3e85ee84424538948457e136832c082894a6ad72944f947219c053163edb6
7
+ data.tar.gz: f0ae42e7d93c87195e2fa6bd710413d445e34726680e388de7887d23616bf1d216ba36e9e3decfba40fec8537b7ce91a8257edc88c68e8e17dfd71c6f0d0b9c4
@@ -1,6 +1,6 @@
1
1
  # Generated by apidoc - http://www.apidoc.me
2
- # Service version: 0.1.8
3
- # apidoc:0.11.33 http://www.apidoc.me/flow/api/0.1.7/ruby_client
2
+ # Service version: 0.1.11
3
+ # apidoc:0.11.34 http://www.apidoc.me/flow/api/0.1.11/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.7/ruby_client' unless defined?(Constants::USER_AGENT)
29
- VERSION = '0.1.8' unless defined?(Constants::VERSION)
28
+ USER_AGENT = 'apidoc:0.11.34 http://www.apidoc.me/flow/api/0.1.11/ruby_client' unless defined?(Constants::USER_AGENT)
29
+ VERSION = '0.1.11' unless defined?(Constants::VERSION)
30
30
  VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
31
31
 
32
32
  end
@@ -237,6 +237,10 @@ module Io
237
237
  @country_defaults ||= ::Io::Flow::V0::Clients::CountryDefaults.new(self)
238
238
  end
239
239
 
240
+ def timezones
241
+ @timezones ||= ::Io::Flow::V0::Clients::Timezones.new(self)
242
+ end
243
+
240
244
  def countries
241
245
  @countries ||= ::Io::Flow::V0::Clients::Countries.new(self)
242
246
  end
@@ -2801,6 +2805,25 @@ module Io
2801
2805
 
2802
2806
  end
2803
2807
 
2808
+ class Timezones
2809
+
2810
+ def initialize(client)
2811
+ @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
2812
+ end
2813
+
2814
+ # Provides timezone based on address or geolocated IP.
2815
+ def get(incoming={})
2816
+ opts = HttpClient::Helper.symbolize_keys(incoming)
2817
+ query = {
2818
+ :address => (x = opts.delete(:address); x.nil? ? nil : HttpClient::Preconditions.assert_class('address', x, String)),
2819
+ :ip => (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String))
2820
+ }.delete_if { |k, v| v.nil? }
2821
+ r = @client.request("/geolocation/timezones").with_query(query).get
2822
+ r.map { |x| ::Io::Flow::V0::Models::Timezone.new(x) }
2823
+ end
2824
+
2825
+ end
2826
+
2804
2827
  class Countries
2805
2828
 
2806
2829
  def initialize(client)
@@ -4238,7 +4261,7 @@ module Io
4238
4261
  end
4239
4262
 
4240
4263
  def CardType.ALL
4241
- @@all ||= [CardType.visa, CardType.mastercard, CardType.american_express, CardType.diners_club, CardType.discover, CardType.jcb, CardType.china_union_pay]
4264
+ @@all ||= [CardType.visa, CardType.mastercard, CardType.american_express, CardType.dankort, CardType.diners_club, CardType.discover, CardType.jcb, CardType.china_union_pay]
4242
4265
  end
4243
4266
 
4244
4267
  def CardType.visa
@@ -4253,6 +4276,10 @@ module Io
4253
4276
  @@_american_express ||= CardType.new('american_express')
4254
4277
  end
4255
4278
 
4279
+ def CardType.dankort
4280
+ @@_dankort ||= CardType.new('dankort')
4281
+ end
4282
+
4256
4283
  def CardType.diners_club
4257
4284
  @@_diners_club ||= CardType.new('diners_club')
4258
4285
  end
@@ -6131,7 +6158,7 @@ module Io
6131
6158
  # capture up to the amount of the authorization.
6132
6159
  class Authorization
6133
6160
 
6134
- attr_reader :id, :key, :card, :amount, :currency, :customer, :attributes, :shipping, :ip, :cvv, :details
6161
+ attr_reader :id, :key, :card, :amount, :currency, :customer, :attributes, :destination, :ip, :cvv, :details
6135
6162
 
6136
6163
  def initialize(incoming={})
6137
6164
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -6143,7 +6170,7 @@ module Io
6143
6170
  @currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
6144
6171
  @customer = (x = opts.delete(:customer); x.is_a?(::Io::Flow::V0::Models::Customer) ? x : ::Io::Flow::V0::Models::Customer.new(x))
6145
6172
  @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 }
6146
- @shipping = (x = opts.delete(:shipping); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Address) ? x : ::Io::Flow::V0::Models::Address.new(x)))
6173
+ @destination = (x = opts.delete(:destination); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Address) ? x : ::Io::Flow::V0::Models::Address.new(x)))
6147
6174
  @ip = (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String))
6148
6175
  @cvv = (x = opts.delete(:cvv); x.nil? ? nil : HttpClient::Preconditions.assert_class('cvv', x, String))
6149
6176
  @details = (x = opts.delete(:details); x.is_a?(::Io::Flow::V0::Models::AuthorizationDetails) ? x : ::Io::Flow::V0::Models::AuthorizationDetails.from_json(x))
@@ -6166,7 +6193,7 @@ module Io
6166
6193
  :currency => currency,
6167
6194
  :customer => customer.to_hash,
6168
6195
  :attributes => attributes,
6169
- :shipping => shipping.nil? ? nil : shipping.to_hash,
6196
+ :destination => destination.nil? ? nil : destination.to_hash,
6170
6197
  :ip => ip,
6171
6198
  :cvv => cvv,
6172
6199
  :details => details.to_hash
@@ -7922,7 +7949,7 @@ module Io
7922
7949
  # you can capture up to the amount of the authorization.
7923
7950
  class DirectAuthorizationForm < AuthorizationForm
7924
7951
 
7925
- attr_reader :token, :amount, :currency, :customer, :key, :cvv, :attributes, :shipping, :ip
7952
+ attr_reader :token, :amount, :currency, :customer, :key, :cvv, :attributes, :destination, :ip
7926
7953
 
7927
7954
  def initialize(incoming={})
7928
7955
  super(:name => AuthorizationForm::Types::DIRECT_AUTHORIZATION_FORM)
@@ -7935,7 +7962,7 @@ module Io
7935
7962
  @key = (x = opts.delete(:key); x.nil? ? nil : HttpClient::Preconditions.assert_class('key', x, String))
7936
7963
  @cvv = (x = opts.delete(:cvv); x.nil? ? nil : HttpClient::Preconditions.assert_class('cvv', x, String))
7937
7964
  @attributes = (x = opts.delete(:attributes); x.nil? ? nil : HttpClient::Preconditions.assert_class('attributes', x, Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('attributes', d[1], String); h })
7938
- @shipping = (x = opts.delete(:shipping); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Address) ? x : ::Io::Flow::V0::Models::Address.new(x)))
7965
+ @destination = (x = opts.delete(:destination); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Address) ? x : ::Io::Flow::V0::Models::Address.new(x)))
7939
7966
  @ip = (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String))
7940
7967
  end
7941
7968
 
@@ -7956,7 +7983,7 @@ module Io
7956
7983
  :key => key,
7957
7984
  :cvv => cvv,
7958
7985
  :attributes => attributes.nil? ? nil : attributes,
7959
- :shipping => shipping.nil? ? nil : shipping.to_hash,
7986
+ :destination => destination.nil? ? nil : destination.to_hash,
7960
7987
  :ip => ip
7961
7988
  }
7962
7989
  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.37
4
+ version: 0.0.38
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-19 00:00:00.000000000 Z
11
+ date: 2016-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json