flowcommerce 0.2.13 → 0.2.14

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: 5e209e01320fef03cfe22e4855bc420ae533e67a
4
- data.tar.gz: 45de4ca93686ff823612e4773dee781e83221ed5
3
+ metadata.gz: 570f2711430f893b8e6aac38f04f6f0d79b1157f
4
+ data.tar.gz: 2161ee7824bd35e4061d4d012f1b9cb8f8913b32
5
5
  SHA512:
6
- metadata.gz: 11ef494dd9aa6a1f7e1a431f275bc76e86e167f64721e49ac9f627533ed47463bf29c72c887cb0e7cb8c3fcc4af709222f51cf3f84367016fadef2f7eac34b81
7
- data.tar.gz: 70cafeea55dc71d6256f6943be0475d0224c124f6cdbd9def42ac2249be4320502578ff384c1211bd64388c77ce882d301250583d0127276a79609eff349062a
6
+ metadata.gz: 5f945690ffda8b186d846aa48422b1fccb32968f9d8ec2fa5e43deedc67c5a4f8538956506f2db66675f68074c05c6f8d3601e36f519da5f09614dad9a82f775
7
+ data.tar.gz: 018820f7afd3769aedf250b3c5a790b8ad2b0e40b36592790d6a28b859ae30692d06f95539c6d403d10dc902406edfe763088031776ac0ef7a0bcb2db57c6475
@@ -1,6 +1,6 @@
1
1
  # Generated by apidoc - http://www.apidoc.me
2
- # Service version: 0.3.17
3
- # apidoc:0.11.78 http://www.apidoc.me/flow/api/0.3.22/ruby_client
2
+ # Service version: 0.3.26
3
+ # apidoc:0.11.78 http://www.apidoc.me/flow/api/0.3.26/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.78 http://www.apidoc.me/flow/api/0.3.22/ruby_client' unless defined?(Constants::USER_AGENT)
29
- VERSION = '0.3.17' unless defined?(Constants::VERSION)
28
+ USER_AGENT = 'apidoc:0.11.78 http://www.apidoc.me/flow/api/0.3.26/ruby_client' unless defined?(Constants::USER_AGENT)
29
+ VERSION = '0.3.26' unless defined?(Constants::VERSION)
30
30
  VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
31
31
 
32
32
  end
@@ -1107,6 +1107,14 @@ module Io
1107
1107
  r.map { |x| ::Io::Flow::V0::Models::Country.new(x) }
1108
1108
  end
1109
1109
 
1110
+ # List of all destination countries available for this organization, including
1111
+ # countries within a world experience.
1112
+ def get_countries_and_destinations_by_organization(organization)
1113
+ HttpClient::Preconditions.assert_class('organization', organization, String)
1114
+ r = @client.request("/#{CGI.escape(organization)}/countries/destinations").get
1115
+ r.map { |x| ::Io::Flow::V0::Models::Country.new(x) }
1116
+ end
1117
+
1110
1118
  # Search organizations. Always paginated.
1111
1119
  def get(incoming={})
1112
1120
  opts = HttpClient::Helper.symbolize_keys(incoming)
@@ -4121,12 +4129,11 @@ module Io
4121
4129
  nil
4122
4130
  end
4123
4131
 
4124
- # Resets the session - returned session will be identical to the result of
4125
- # using POST to create a session, except for we preserve the session id
4126
- def put_reset_by_session(session, session_form)
4132
+ # Resets the session based on the provided geo parameters.
4133
+ def put_reset_by_session(session, session_reset_form)
4127
4134
  HttpClient::Preconditions.assert_class('session', session, String)
4128
- HttpClient::Preconditions.assert_class('session_form', session_form, ::Io::Flow::V0::Models::SessionForm)
4129
- r = @client.request("/sessions/#{CGI.escape(session)}/reset").with_json(session_form.to_json).put
4135
+ HttpClient::Preconditions.assert_class('session_reset_form', session_reset_form, ::Io::Flow::V0::Models::SessionResetForm)
4136
+ r = @client.request("/sessions/#{CGI.escape(session)}/reset").with_json(session_reset_form.to_json).put
4130
4137
  ::Io::Flow::V0::Models::Session.from_json(r)
4131
4138
  end
4132
4139
 
@@ -4141,7 +4148,7 @@ module Io
4141
4148
  HttpClient::Preconditions.assert_class('shop', shop, String)
4142
4149
  HttpClient::Preconditions.assert_class('session_form', session_form, ::Io::Flow::V0::Models::SessionForm)
4143
4150
  r = @client.request("/sessions/shopify/#{CGI.escape(shop)}").with_json(session_form.to_json).post
4144
- ::Io::Flow::V0::Models::ShopifySession.new(r)
4151
+ ::Io::Flow::V0::Models::OrganizationSession.new(r)
4145
4152
  end
4146
4153
 
4147
4154
  end
@@ -10389,13 +10396,15 @@ module Io
10389
10396
 
10390
10397
  class AccountOrdersExportType < ExportType
10391
10398
 
10392
- attr_reader :statement_id, :transaction_summary_id, :transaction_posted_on_or_after, :transaction_posted_after, :transaction_posted_on_or_before, :transaction_posted_before
10399
+ attr_reader :statement_id, :transaction_summary_id, :transaction_posted_from, :transaction_posted_to, :transaction_posted_on_or_after, :transaction_posted_after, :transaction_posted_on_or_before, :transaction_posted_before
10393
10400
 
10394
10401
  def initialize(incoming={})
10395
10402
  super(:discriminator => ExportType::Types::ACCOUNT_ORDERS_EXPORT_TYPE)
10396
10403
  opts = HttpClient::Helper.symbolize_keys(incoming)
10397
10404
  @statement_id = (x = opts.delete(:statement_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('statement_id', x, String))
10398
10405
  @transaction_summary_id = (x = opts.delete(:transaction_summary_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('transaction_summary_id', x, String))
10406
+ @transaction_posted_from = (x = opts.delete(:transaction_posted_from); x.nil? ? nil : HttpClient::Preconditions.assert_class('transaction_posted_from', HttpClient::Helper.to_date_iso8601(x), Date))
10407
+ @transaction_posted_to = (x = opts.delete(:transaction_posted_to); x.nil? ? nil : HttpClient::Preconditions.assert_class('transaction_posted_to', HttpClient::Helper.to_date_iso8601(x), Date))
10399
10408
  @transaction_posted_on_or_after = (x = opts.delete(:transaction_posted_on_or_after); x.nil? ? nil : HttpClient::Preconditions.assert_class('transaction_posted_on_or_after', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
10400
10409
  @transaction_posted_after = (x = opts.delete(:transaction_posted_after); x.nil? ? nil : HttpClient::Preconditions.assert_class('transaction_posted_after', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
10401
10410
  @transaction_posted_on_or_before = (x = opts.delete(:transaction_posted_on_or_before); x.nil? ? nil : HttpClient::Preconditions.assert_class('transaction_posted_on_or_before', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
@@ -10414,6 +10423,8 @@ module Io
10414
10423
  {
10415
10424
  :statement_id => statement_id,
10416
10425
  :transaction_summary_id => transaction_summary_id,
10426
+ :transaction_posted_from => transaction_posted_from,
10427
+ :transaction_posted_to => transaction_posted_to,
10417
10428
  :transaction_posted_on_or_after => transaction_posted_on_or_after,
10418
10429
  :transaction_posted_after => transaction_posted_after,
10419
10430
  :transaction_posted_on_or_before => transaction_posted_on_or_before,
@@ -10425,13 +10436,15 @@ module Io
10425
10436
 
10426
10437
  class AccountTransactionsExportType < ExportType
10427
10438
 
10428
- attr_reader :statement_id, :transaction_summary_id, :posted_on_or_after, :posted_after, :posted_on_or_before, :posted_before
10439
+ attr_reader :statement_id, :transaction_summary_id, :posted_from, :posted_to, :posted_on_or_after, :posted_after, :posted_on_or_before, :posted_before
10429
10440
 
10430
10441
  def initialize(incoming={})
10431
10442
  super(:discriminator => ExportType::Types::ACCOUNT_TRANSACTIONS_EXPORT_TYPE)
10432
10443
  opts = HttpClient::Helper.symbolize_keys(incoming)
10433
10444
  @statement_id = (x = opts.delete(:statement_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('statement_id', x, String))
10434
10445
  @transaction_summary_id = (x = opts.delete(:transaction_summary_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('transaction_summary_id', x, String))
10446
+ @posted_from = (x = opts.delete(:posted_from); x.nil? ? nil : HttpClient::Preconditions.assert_class('posted_from', HttpClient::Helper.to_date_iso8601(x), Date))
10447
+ @posted_to = (x = opts.delete(:posted_to); x.nil? ? nil : HttpClient::Preconditions.assert_class('posted_to', HttpClient::Helper.to_date_iso8601(x), Date))
10435
10448
  @posted_on_or_after = (x = opts.delete(:posted_on_or_after); x.nil? ? nil : HttpClient::Preconditions.assert_class('posted_on_or_after', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
10436
10449
  @posted_after = (x = opts.delete(:posted_after); x.nil? ? nil : HttpClient::Preconditions.assert_class('posted_after', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
10437
10450
  @posted_on_or_before = (x = opts.delete(:posted_on_or_before); x.nil? ? nil : HttpClient::Preconditions.assert_class('posted_on_or_before', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
@@ -10450,6 +10463,8 @@ module Io
10450
10463
  {
10451
10464
  :statement_id => statement_id,
10452
10465
  :transaction_summary_id => transaction_summary_id,
10466
+ :posted_from => posted_from,
10467
+ :posted_to => posted_to,
10453
10468
  :posted_on_or_after => posted_on_or_after,
10454
10469
  :posted_after => posted_after,
10455
10470
  :posted_on_or_before => posted_on_or_before,
@@ -13349,7 +13364,7 @@ module Io
13349
13364
  @price = (x = opts.delete(:price); x.is_a?(::Io::Flow::V0::Models::PriceWithBase) ? x : ::Io::Flow::V0::Models::PriceWithBase.new(x))
13350
13365
  @service = (x = opts.delete(:service); x.is_a?(::Io::Flow::V0::Models::ServiceSummary) ? x : ::Io::Flow::V0::Models::ServiceSummary.new(x))
13351
13366
  @tier = (x = opts.delete(:tier); x.is_a?(::Io::Flow::V0::Models::TierSummary) ? x : ::Io::Flow::V0::Models::TierSummary.new(x))
13352
- @window = (x = opts.delete(:window); x.is_a?(::Io::Flow::V0::Models::DatetimeRange) ? x : ::Io::Flow::V0::Models::DatetimeRange.new(x))
13367
+ @window = (x = opts.delete(:window); x.is_a?(::Io::Flow::V0::Models::DeliveryWindow) ? x : ::Io::Flow::V0::Models::DeliveryWindow.new(x))
13353
13368
  @rule_outcome = (x = opts.delete(:rule_outcome); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::TierRuleOutcome) ? x : ::Io::Flow::V0::Models::TierRuleOutcome.from_json(x)))
13354
13369
  @weight = (x = opts.delete(:weight); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::OptionWeightEstimates) ? x : ::Io::Flow::V0::Models::OptionWeightEstimates.new(x)))
13355
13370
  end
@@ -13568,13 +13583,14 @@ module Io
13568
13583
 
13569
13584
  class DeliveryWindow
13570
13585
 
13571
- attr_reader :from, :to
13586
+ attr_reader :from, :to, :label
13572
13587
 
13573
13588
  def initialize(incoming={})
13574
13589
  opts = HttpClient::Helper.symbolize_keys(incoming)
13575
13590
  HttpClient::Preconditions.require_keys(opts, [:from, :to], 'DeliveryWindow')
13576
13591
  @from = HttpClient::Preconditions.assert_class('from', HttpClient::Helper.to_date_time_iso8601(opts.delete(:from)), DateTime)
13577
13592
  @to = HttpClient::Preconditions.assert_class('to', HttpClient::Helper.to_date_time_iso8601(opts.delete(:to)), DateTime)
13593
+ @label = (x = opts.delete(:label); x.nil? ? nil : HttpClient::Preconditions.assert_class('label', x, String))
13578
13594
  end
13579
13595
 
13580
13596
  def to_json
@@ -13588,7 +13604,8 @@ module Io
13588
13604
  def to_hash
13589
13605
  {
13590
13606
  :from => from,
13591
- :to => to
13607
+ :to => to,
13608
+ :label => label
13592
13609
  }
13593
13610
  end
13594
13611
 
@@ -20165,7 +20182,7 @@ module Io
20165
20182
 
20166
20183
  class OrganizationUpserted < Event
20167
20184
 
20168
- attr_reader :event_id, :timestamp, :id, :name, :environment, :currencies, :parent_id, :default_base_currency, :default_country
20185
+ attr_reader :event_id, :timestamp, :id, :name, :environment, :currencies, :parent_id, :default_base_currency, :default_country, :default_language, :default_locale, :default_timezone
20169
20186
 
20170
20187
  def initialize(incoming={})
20171
20188
  super(:discriminator => Event::Types::ORGANIZATION_UPSERTED)
@@ -20180,6 +20197,9 @@ module Io
20180
20197
  @parent_id = (x = opts.delete(:parent_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('parent_id', x, String))
20181
20198
  @default_base_currency = (x = opts.delete(:default_base_currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('default_base_currency', x, String))
20182
20199
  @default_country = (x = opts.delete(:default_country); x.nil? ? nil : HttpClient::Preconditions.assert_class('default_country', x, String))
20200
+ @default_language = (x = opts.delete(:default_language); x.nil? ? nil : HttpClient::Preconditions.assert_class('default_language', x, String))
20201
+ @default_locale = (x = opts.delete(:default_locale); x.nil? ? nil : HttpClient::Preconditions.assert_class('default_locale', x, String))
20202
+ @default_timezone = (x = opts.delete(:default_timezone); x.nil? ? nil : HttpClient::Preconditions.assert_class('default_timezone', x, String))
20183
20203
  end
20184
20204
 
20185
20205
  def to_json
@@ -20200,7 +20220,10 @@ module Io
20200
20220
  :currencies => currencies,
20201
20221
  :parent_id => parent_id,
20202
20222
  :default_base_currency => default_base_currency,
20203
- :default_country => default_country
20223
+ :default_country => default_country,
20224
+ :default_language => default_language,
20225
+ :default_locale => default_locale,
20226
+ :default_timezone => default_timezone
20204
20227
  }
20205
20228
  end
20206
20229
 
@@ -22862,10 +22885,11 @@ module Io
22862
22885
 
22863
22886
  class SessionPutForm
22864
22887
 
22865
- attr_reader :experience, :country, :currency, :language, :locale, :attributes
22888
+ attr_reader :ip, :experience, :country, :currency, :language, :locale, :attributes
22866
22889
 
22867
22890
  def initialize(incoming={})
22868
22891
  opts = HttpClient::Helper.symbolize_keys(incoming)
22892
+ @ip = (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String))
22869
22893
  @experience = (x = opts.delete(:experience); x.nil? ? nil : HttpClient::Preconditions.assert_class('experience', x, String))
22870
22894
  @country = (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, String))
22871
22895
  @currency = (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String))
@@ -22884,6 +22908,7 @@ module Io
22884
22908
 
22885
22909
  def to_hash
22886
22910
  {
22911
+ :ip => ip,
22887
22912
  :experience => experience,
22888
22913
  :country => country,
22889
22914
  :currency => currency,
@@ -22895,6 +22920,41 @@ module Io
22895
22920
 
22896
22921
  end
22897
22922
 
22923
+ class SessionResetForm
22924
+
22925
+ attr_reader :ip, :experience, :country, :currency, :language, :locale
22926
+
22927
+ def initialize(incoming={})
22928
+ opts = HttpClient::Helper.symbolize_keys(incoming)
22929
+ @ip = (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String))
22930
+ @experience = (x = opts.delete(:experience); x.nil? ? nil : HttpClient::Preconditions.assert_class('experience', x, String))
22931
+ @country = (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, String))
22932
+ @currency = (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String))
22933
+ @language = (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String))
22934
+ @locale = (x = opts.delete(:locale); x.nil? ? nil : HttpClient::Preconditions.assert_class('locale', x, String))
22935
+ end
22936
+
22937
+ def to_json
22938
+ JSON.dump(to_hash)
22939
+ end
22940
+
22941
+ def copy(incoming={})
22942
+ SessionResetForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
22943
+ end
22944
+
22945
+ def to_hash
22946
+ {
22947
+ :ip => ip,
22948
+ :experience => experience,
22949
+ :country => country,
22950
+ :currency => currency,
22951
+ :language => language,
22952
+ :locale => locale
22953
+ }
22954
+ end
22955
+
22956
+ end
22957
+
22898
22958
  class ShippingAddress
22899
22959
 
22900
22960
  attr_reader :contact, :location
@@ -25767,13 +25827,14 @@ module Io
25767
25827
 
25768
25828
  class Zone
25769
25829
 
25770
- attr_reader :province, :country
25830
+ attr_reader :province, :country, :region
25771
25831
 
25772
25832
  def initialize(incoming={})
25773
25833
  opts = HttpClient::Helper.symbolize_keys(incoming)
25774
- HttpClient::Preconditions.require_keys(opts, [:country], 'Zone')
25834
+ HttpClient::Preconditions.require_keys(opts, [:region], 'Zone')
25775
25835
  @province = (x = opts.delete(:province); x.nil? ? nil : HttpClient::Preconditions.assert_class('province', x, String))
25776
- @country = HttpClient::Preconditions.assert_class('country', opts.delete(:country), String)
25836
+ @country = (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, String))
25837
+ @region = HttpClient::Preconditions.assert_class('region', opts.delete(:region), String)
25777
25838
  end
25778
25839
 
25779
25840
  def to_json
@@ -25787,7 +25848,8 @@ module Io
25787
25848
  def to_hash
25788
25849
  {
25789
25850
  :province => province,
25790
- :country => country
25851
+ :country => country,
25852
+ :region => region
25791
25853
  }
25792
25854
  end
25793
25855
 
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.2.13
4
+ version: 0.2.14
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: 2017-04-29 00:00:00.000000000 Z
11
+ date: 2017-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json