flowcommerce 0.0.90 → 0.0.91

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: 236cabf874c2c1fa7b885f1e4da31f732a7e1fac
4
- data.tar.gz: 53aa8b47c295e6dd0c97640bab0204c575b892b1
3
+ metadata.gz: 4867dbd7464282c3d23db43bb7db5d4612b7fc09
4
+ data.tar.gz: 30425f529a28d31d4aef5c02f82a74f6f82c11cb
5
5
  SHA512:
6
- metadata.gz: f10e53238169a8120d52b6449b55cabd70bb3d265fb2065f4f16375d583127d9923c3a9eeeaff7ab05334f37f06e4438661449d164825831cd939300abee5ad7
7
- data.tar.gz: 7d4c859684a3afb6aa01f6bdce026a9575989e05f71017d705dbb18a5a85972af55a632835a80e19455e6fedc5d123ed8d8145f3d88a59129c1fc7822806bcb4
6
+ metadata.gz: 9ef86b091264a226fc4175d3f5c8b20400d60a947566844743977695eaa01b0821375c00812f10272e7130885c554c0f62725273cdcb7d4a1219f3dd1da13b2c
7
+ data.tar.gz: 78beb6bb815e52cc6d17349c2496d27b74e4f9ce360c2eeeda71cd35660c44066c0b195a451614f00abe13d3f13eae0b9232f490fb78fa4071c721f47edf21c0
@@ -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.2.3/ruby_client
3
+ # apidoc:0.11.49 http://www.apidoc.me/flow/api/0.2.5/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.2.3/ruby_client' unless defined?(Constants::USER_AGENT)
28
+ USER_AGENT = 'apidoc:0.11.49 http://www.apidoc.me/flow/api/0.2.5/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
 
@@ -3590,9 +3590,9 @@ module Io
3590
3590
  # used throughout APIs at Flow, including the user's role in that organization
3591
3591
  # and the organization environment. Otherwise, returns 401 - this indicates
3592
3592
  # either the org does not exist or the user does not have access to the org.
3593
- def get_by_organization(organization)
3594
- HttpClient::Preconditions.assert_class('organization', organization, String)
3595
- r = @client.request("/organization-authorizations/#{CGI.escape(organization)}").get
3593
+ def post(organization_authorization_form)
3594
+ HttpClient::Preconditions.assert_class('organization_authorization_form', organization_authorization_form, ::Io::Flow::V0::Models::OrganizationAuthorizationForm)
3595
+ r = @client.request("/organization-authorizations").with_json(organization_authorization_form.to_json).post
3596
3596
  ::Io::Flow::V0::Models::OrganizationAuthorization.new(r)
3597
3597
  end
3598
3598
 
@@ -3671,7 +3671,6 @@ module Io
3671
3671
  opts = HttpClient::Helper.symbolize_keys(incoming)
3672
3672
  query = {
3673
3673
  :id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
3674
- :token => (x = opts.delete(:token); x.nil? ? nil : HttpClient::Preconditions.assert_class('token', x, String)),
3675
3674
  :organization => (x = opts.delete(:organization); x.nil? ? nil : HttpClient::Preconditions.assert_class('organization', x, String)),
3676
3675
  :partner => (x = opts.delete(:partner); x.nil? ? nil : HttpClient::Preconditions.assert_class('partner', x, String)),
3677
3676
  :limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
@@ -3719,28 +3718,6 @@ module Io
3719
3718
  ::Io::Flow::V0::Models::TokenReference.from_json(r)
3720
3719
  end
3721
3720
 
3722
- # Preferred method to validate a token if valid for a given partner, obtaining
3723
- # specific information if the token is valid (or a 404 if the token does not
3724
- # exist). We use an HTTP POST with a form body to enusre that the token itself
3725
- # is not logged in the request logs.
3726
- def post_authentications_and_organizations_by_organization(organization, token_authentication_form)
3727
- HttpClient::Preconditions.assert_class('organization', organization, String)
3728
- HttpClient::Preconditions.assert_class('token_authentication_form', token_authentication_form, ::Io::Flow::V0::Models::TokenAuthenticationForm)
3729
- r = @client.request("/tokens/authentications/organizations/#{CGI.escape(organization)}").with_json(token_authentication_form.to_json).post
3730
- ::Io::Flow::V0::Models::OrganizationTokenReference.new(r)
3731
- end
3732
-
3733
- # Preferred method to validate a token if valid for a given partner, obtaining
3734
- # specific information if the token is valid (or a 404 if the token does not
3735
- # exist). We use an HTTP POST with a form body to enusre that the token itself
3736
- # is not logged in the request logs.
3737
- def post_authentications_and_partners_by_partner(partner, token_authentication_form)
3738
- HttpClient::Preconditions.assert_class('partner', partner, String)
3739
- HttpClient::Preconditions.assert_class('token_authentication_form', token_authentication_form, ::Io::Flow::V0::Models::TokenAuthenticationForm)
3740
- r = @client.request("/tokens/authentications/partners/#{CGI.escape(partner)}").with_json(token_authentication_form.to_json).post
3741
- ::Io::Flow::V0::Models::PartnerTokenReference.new(r)
3742
- end
3743
-
3744
3721
  end
3745
3722
 
3746
3723
  class TokenValidations
@@ -4823,7 +4800,6 @@ module Io
4823
4800
  class Token
4824
4801
 
4825
4802
  module Types
4826
- LEGACY_TOKEN = 'legacy_token' unless defined?(LEGACY_TOKEN)
4827
4803
  ORGANIZATION_TOKEN = 'organization_token' unless defined?(ORGANIZATION_TOKEN)
4828
4804
  PARTNER_TOKEN = 'partner_token' unless defined?(PARTNER_TOKEN)
4829
4805
  end
@@ -4835,7 +4811,7 @@ module Io
4835
4811
  end
4836
4812
 
4837
4813
  def subtype_to_hash
4838
- raise 'Cannot serialize an instance of token directly - must use one of the specific types: legacy_token, organization_token, partner_token'
4814
+ raise 'Cannot serialize an instance of token directly - must use one of the specific types: organization_token, partner_token'
4839
4815
  end
4840
4816
 
4841
4817
  def to_hash
@@ -4849,7 +4825,6 @@ module Io
4849
4825
  raise "Union type[token] requires a field named 'discriminator'"
4850
4826
  end
4851
4827
  case discriminator
4852
- when Types::LEGACY_TOKEN; LegacyToken.new(hash)
4853
4828
  when Types::ORGANIZATION_TOKEN; OrganizationToken.new(hash)
4854
4829
  when Types::PARTNER_TOKEN; PartnerToken.new(hash)
4855
4830
  else TokenUndefinedType.new(:name => discriminator)
@@ -4885,7 +4860,6 @@ module Io
4885
4860
  class TokenForm
4886
4861
 
4887
4862
  module Types
4888
- LEGACY_TOKEN_FORM = 'legacy_token_form' unless defined?(LEGACY_TOKEN_FORM)
4889
4863
  ORGANIZATION_TOKEN_FORM = 'organization_token_form' unless defined?(ORGANIZATION_TOKEN_FORM)
4890
4864
  PARTNER_TOKEN_FORM = 'partner_token_form' unless defined?(PARTNER_TOKEN_FORM)
4891
4865
  end
@@ -4897,7 +4871,7 @@ module Io
4897
4871
  end
4898
4872
 
4899
4873
  def subtype_to_hash
4900
- raise 'Cannot serialize an instance of token_form directly - must use one of the specific types: legacy_token_form, organization_token_form, partner_token_form'
4874
+ raise 'Cannot serialize an instance of token_form directly - must use one of the specific types: organization_token_form, partner_token_form'
4901
4875
  end
4902
4876
 
4903
4877
  def to_hash
@@ -4911,7 +4885,6 @@ module Io
4911
4885
  raise "Union type[token_form] requires a field named 'discriminator'"
4912
4886
  end
4913
4887
  case discriminator
4914
- when Types::LEGACY_TOKEN_FORM; LegacyTokenForm.new(hash)
4915
4888
  when Types::ORGANIZATION_TOKEN_FORM; OrganizationTokenForm.new(hash)
4916
4889
  when Types::PARTNER_TOKEN_FORM; PartnerTokenForm.new(hash)
4917
4890
  else TokenFormUndefinedType.new(:name => discriminator)
@@ -4947,7 +4920,6 @@ module Io
4947
4920
  class TokenReference
4948
4921
 
4949
4922
  module Types
4950
- LEGACY_TOKEN_REFERENCE = 'legacy_token_reference' unless defined?(LEGACY_TOKEN_REFERENCE)
4951
4923
  ORGANIZATION_TOKEN_REFERENCE = 'organization_token_reference' unless defined?(ORGANIZATION_TOKEN_REFERENCE)
4952
4924
  PARTNER_TOKEN_REFERENCE = 'partner_token_reference' unless defined?(PARTNER_TOKEN_REFERENCE)
4953
4925
  end
@@ -4959,7 +4931,7 @@ module Io
4959
4931
  end
4960
4932
 
4961
4933
  def subtype_to_hash
4962
- raise 'Cannot serialize an instance of token_reference directly - must use one of the specific types: legacy_token_reference, organization_token_reference, partner_token_reference'
4934
+ raise 'Cannot serialize an instance of token_reference directly - must use one of the specific types: organization_token_reference, partner_token_reference'
4963
4935
  end
4964
4936
 
4965
4937
  def to_hash
@@ -4973,7 +4945,6 @@ module Io
4973
4945
  raise "Union type[token_reference] requires a field named 'discriminator'"
4974
4946
  end
4975
4947
  case discriminator
4976
- when Types::LEGACY_TOKEN_REFERENCE; LegacyTokenReference.new(hash)
4977
4948
  when Types::ORGANIZATION_TOKEN_REFERENCE; OrganizationTokenReference.new(hash)
4978
4949
  when Types::PARTNER_TOKEN_REFERENCE; PartnerTokenReference.new(hash)
4979
4950
  else TokenReferenceUndefinedType.new(:name => discriminator)
@@ -13237,98 +13208,6 @@ module Io
13237
13208
 
13238
13209
  end
13239
13210
 
13240
- # All of the metadata associated with a given token.
13241
- class LegacyToken < Token
13242
-
13243
- attr_reader :id, :user, :partial, :created_at, :description
13244
-
13245
- def initialize(incoming={})
13246
- super(:name => Token::Types::LEGACY_TOKEN)
13247
- opts = HttpClient::Helper.symbolize_keys(incoming)
13248
- HttpClient::Preconditions.require_keys(opts, [:id, :user, :partial, :created_at], 'LegacyToken')
13249
- @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
13250
- @user = (x = opts.delete(:user); x.is_a?(::Io::Flow::V0::Models::UserReference) ? x : ::Io::Flow::V0::Models::UserReference.new(x))
13251
- @partial = HttpClient::Preconditions.assert_class('partial', opts.delete(:partial), String)
13252
- @created_at = HttpClient::Preconditions.assert_class('created_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:created_at)), DateTime)
13253
- @description = (x = opts.delete(:description); x.nil? ? nil : HttpClient::Preconditions.assert_class('description', x, String))
13254
- end
13255
-
13256
- def to_json
13257
- JSON.dump(to_hash)
13258
- end
13259
-
13260
- def copy(incoming={})
13261
- LegacyToken.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
13262
- end
13263
-
13264
- def subtype_to_hash
13265
- {
13266
- :id => id,
13267
- :user => user.to_hash,
13268
- :partial => partial,
13269
- :created_at => created_at,
13270
- :description => description
13271
- }
13272
- end
13273
-
13274
- end
13275
-
13276
- class LegacyTokenForm < TokenForm
13277
-
13278
- attr_reader :description
13279
-
13280
- def initialize(incoming={})
13281
- super(:name => TokenForm::Types::LEGACY_TOKEN_FORM)
13282
- opts = HttpClient::Helper.symbolize_keys(incoming)
13283
- @description = (x = opts.delete(:description); x.nil? ? nil : HttpClient::Preconditions.assert_class('description', x, String))
13284
- end
13285
-
13286
- def to_json
13287
- JSON.dump(to_hash)
13288
- end
13289
-
13290
- def copy(incoming={})
13291
- LegacyTokenForm.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
13292
- end
13293
-
13294
- def subtype_to_hash
13295
- {
13296
- :description => description
13297
- }
13298
- end
13299
-
13300
- end
13301
-
13302
- # Summary data for a given token
13303
- class LegacyTokenReference < TokenReference
13304
-
13305
- attr_reader :id, :user
13306
-
13307
- def initialize(incoming={})
13308
- super(:name => TokenReference::Types::LEGACY_TOKEN_REFERENCE)
13309
- opts = HttpClient::Helper.symbolize_keys(incoming)
13310
- HttpClient::Preconditions.require_keys(opts, [:id, :user], 'LegacyTokenReference')
13311
- @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
13312
- @user = (x = opts.delete(:user); x.is_a?(::Io::Flow::V0::Models::UserReference) ? x : ::Io::Flow::V0::Models::UserReference.new(x))
13313
- end
13314
-
13315
- def to_json
13316
- JSON.dump(to_hash)
13317
- end
13318
-
13319
- def copy(incoming={})
13320
- LegacyTokenReference.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
13321
- end
13322
-
13323
- def subtype_to_hash
13324
- {
13325
- :id => id,
13326
- :user => user.to_hash
13327
- }
13328
- end
13329
-
13330
- end
13331
-
13332
13211
  # Line items represent the items a consumer is purchasing, including additional
13333
13212
  # information to complete the transaction. Note that you may pass in as many
13334
13213
  # line items as you like - including repeating item numbers across line items.
@@ -14852,6 +14731,34 @@ module Io
14852
14731
 
14853
14732
  end
14854
14733
 
14734
+ class OrganizationAuthorizationForm
14735
+
14736
+ attr_reader :organization, :environment
14737
+
14738
+ def initialize(incoming={})
14739
+ opts = HttpClient::Helper.symbolize_keys(incoming)
14740
+ HttpClient::Preconditions.require_keys(opts, [:organization, :environment], 'OrganizationAuthorizationForm')
14741
+ @organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
14742
+ @environment = (x = opts.delete(:environment); x.is_a?(::Io::Flow::V0::Models::Environment) ? x : ::Io::Flow::V0::Models::Environment.apply(x))
14743
+ end
14744
+
14745
+ def to_json
14746
+ JSON.dump(to_hash)
14747
+ end
14748
+
14749
+ def copy(incoming={})
14750
+ OrganizationAuthorizationForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
14751
+ end
14752
+
14753
+ def to_hash
14754
+ {
14755
+ :organization => organization,
14756
+ :environment => environment.value
14757
+ }
14758
+ end
14759
+
14760
+ end
14761
+
14855
14762
  # Represents organization-specific currency conversion adjustments.
14856
14763
  class OrganizationCurrencySetting
14857
14764
 
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.90
4
+ version: 0.0.91
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-10-15 00:00:00.000000000 Z
11
+ date: 2016-10-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json