flowcommerce 0.2.81 → 0.2.82

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
- SHA256:
3
- metadata.gz: 64e4aa9a200c0fbdcb2ffa2c5bca8fbdbc138956ff196538cb5876279298a5b3
4
- data.tar.gz: 5a246655756e1d594130ae64cb3214f6407cf4110d55b84940ba5fa7982318ce
2
+ SHA1:
3
+ metadata.gz: d4aec1af1549e7676afef9e8af577a559c8f25f7
4
+ data.tar.gz: ea29719c4e347443b5d22195bbb5f40de6bac680
5
5
  SHA512:
6
- metadata.gz: 5f71004f0cce6bb3460619278e883abdf01613c2e6b12e971e61a782b7bd0b7a2d496713d92d7f14256fdffc9513c55e824d394e00cfecf8788ac7dca373632b
7
- data.tar.gz: b459edd07448f75486001c79a033aafbfa4bea31b1c81eb0a4128b238eee4ef3d0066b7208e938dab33fef62671bfabc37395b352128b40e7027ed5554edd77a
6
+ metadata.gz: 904fcdf22f519d5bb5d1c922ee3e770e45fcdb7d82d9d09289816b2b57b71b72ddbcb1db48cfe8c035213f019fdb64515d1a4874bc9939a86b626ed5c8e87b1d
7
+ data.tar.gz: e51d3987b6e4a53e50fc105fec35c04e21bfd99ca2bb55ad15cc5da58f80169fade1bab05c871acb36c16ac39e178b82d7a4df4fb6d89529895c5d748fcfff5d
@@ -1,6 +1,6 @@
1
1
  # Generated by API Builder - https://www.apibuilder.io
2
- # Service version: 0.9.33
3
- # apibuilder 0.15.8 app.apibuilder.io/flow/api/latest/ruby_client
2
+ # Service version: 0.9.42
3
+ # apibuilder 0.15.9 app.apibuilder.io/flow/api/latest/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 = 'apibuilder 0.15.8 app.apibuilder.io/flow/api/latest/ruby_client' unless defined?(Constants::USER_AGENT)
29
- VERSION = '0.9.33' unless defined?(Constants::VERSION)
28
+ USER_AGENT = 'apibuilder 0.15.9 app.apibuilder.io/flow/api/latest/ruby_client' unless defined?(Constants::USER_AGENT)
29
+ VERSION = '0.9.42' unless defined?(Constants::VERSION)
30
30
  VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
31
31
 
32
32
  end
@@ -3990,10 +3990,14 @@ module Io
3990
3990
  r.map { |x| ::Io::Flow::V0::Models::Quote.new(x) }
3991
3991
  end
3992
3992
 
3993
- def post(organization, quote_form)
3993
+ def post(organization, quote_form, incoming={})
3994
3994
  HttpClient::Preconditions.assert_class('organization', organization, String)
3995
+ opts = HttpClient::Helper.symbolize_keys(incoming)
3996
+ query = {
3997
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
3998
+ }.delete_if { |k, v| v.nil? }
3995
3999
  (x = quote_form; x.is_a?(::Io::Flow::V0::Models::QuoteForm) ? x : ::Io::Flow::V0::Models::QuoteForm.new(x))
3996
- r = @client.request("/#{CGI.escape(organization)}/quotes").with_json(quote_form.to_json).post
4000
+ r = @client.request("/#{CGI.escape(organization)}/quotes").with_query(query).with_json(quote_form.to_json).post
3997
4001
  ::Io::Flow::V0::Models::Quote.new(r)
3998
4002
  end
3999
4003
 
@@ -4054,6 +4058,13 @@ module Io
4054
4058
  ::Io::Flow::V0::Models::Ratecard.new(r)
4055
4059
  end
4056
4060
 
4061
+ def delete_by_id(organization, id)
4062
+ HttpClient::Preconditions.assert_class('organization', organization, String)
4063
+ HttpClient::Preconditions.assert_class('id', id, String)
4064
+ r = @client.request("/#{CGI.escape(organization)}/ratecards/#{CGI.escape(id)}").delete
4065
+ nil
4066
+ end
4067
+
4057
4068
  def put_publish_by_id(organization, id)
4058
4069
  HttpClient::Preconditions.assert_class('organization', organization, String)
4059
4070
  HttpClient::Preconditions.assert_class('id', id, String)
@@ -4075,19 +4086,27 @@ module Io
4075
4086
  # gravitational weight, the weight field must be set. When estimating based
4076
4087
  # off dimensional weight, then length/width/depth must be set. For either one,
4077
4088
  # the appropriate unit of measurement must be given.
4078
- def post(organization, ratecard_estimate_form)
4089
+ def post(organization, ratecard_estimate_form, incoming={})
4079
4090
  HttpClient::Preconditions.assert_class('organization', organization, String)
4091
+ opts = HttpClient::Helper.symbolize_keys(incoming)
4092
+ query = {
4093
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
4094
+ }.delete_if { |k, v| v.nil? }
4080
4095
  (x = ratecard_estimate_form; x.is_a?(::Io::Flow::V0::Models::RatecardEstimateForm) ? x : ::Io::Flow::V0::Models::RatecardEstimateForm.from_json(x))
4081
- r = @client.request("/#{CGI.escape(organization)}/ratecard_estimates").with_json(ratecard_estimate_form.to_json).post
4096
+ r = @client.request("/#{CGI.escape(organization)}/ratecard_estimates").with_query(query).with_json(ratecard_estimate_form.to_json).post
4082
4097
  r.map { |x| ::Io::Flow::V0::Models::RatecardEstimate.from_json(x) }
4083
4098
  end
4084
4099
 
4085
4100
  # Endpoint to get a summary of the shipment estimates based on applicable rate
4086
4101
  # cards. An origin and destination country must be provided.
4087
- def post_summaries(organization, ratecard_estimate_summary_form)
4102
+ def post_summaries(organization, ratecard_estimate_summary_form, incoming={})
4088
4103
  HttpClient::Preconditions.assert_class('organization', organization, String)
4104
+ opts = HttpClient::Helper.symbolize_keys(incoming)
4105
+ query = {
4106
+ :context => (x = opts.delete(:context); x.nil? ? nil : HttpClient::Preconditions.assert_class('context', x, String))
4107
+ }.delete_if { |k, v| v.nil? }
4089
4108
  (x = ratecard_estimate_summary_form; x.is_a?(::Io::Flow::V0::Models::RatecardEstimateSummaryForm) ? x : ::Io::Flow::V0::Models::RatecardEstimateSummaryForm.new(x))
4090
- r = @client.request("/#{CGI.escape(organization)}/ratecard_estimates/summaries").with_json(ratecard_estimate_summary_form.to_json).post
4109
+ r = @client.request("/#{CGI.escape(organization)}/ratecard_estimates/summaries").with_query(query).with_json(ratecard_estimate_summary_form.to_json).post
4091
4110
  r.map { |x| ::Io::Flow::V0::Models::RatecardEstimate.from_json(x) }
4092
4111
  end
4093
4112
 
@@ -6676,101 +6695,101 @@ module Io
6676
6695
  @client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
6677
6696
  end
6678
6697
 
6679
- def post_organizations_by_organization(organization, session_form)
6698
+ def post_shopify_and_organizations_by_organization(organization, session_form)
6680
6699
  HttpClient::Preconditions.assert_class('organization', organization, String)
6681
6700
  (x = session_form; x.is_a?(::Io::Flow::V0::Models::SessionForm) ? x : ::Io::Flow::V0::Models::SessionForm.new(x))
6682
- r = @client.request("/sessions/organizations/#{CGI.escape(organization)}").with_json(session_form.to_json).post
6701
+ r = @client.request("/sessions/shopify/organizations/#{CGI.escape(organization)}").with_json(session_form.to_json).post
6683
6702
  ::Io::Flow::V0::Models::OrganizationSession.new(r)
6684
6703
  end
6685
6704
 
6686
- def get_by_session(session)
6705
+ def get_shopify_by_session(session)
6687
6706
  HttpClient::Preconditions.assert_class('session', session, String)
6688
- r = @client.request("/sessions/#{CGI.escape(session)}").get
6707
+ r = @client.request("/sessions/shopify/#{CGI.escape(session)}").get
6689
6708
  ::Io::Flow::V0::Models::Session.from_json(r)
6690
6709
  end
6691
6710
 
6692
- def put_by_session(session, session_put_form)
6711
+ def put_shopify_by_session(session, session_put_form)
6693
6712
  HttpClient::Preconditions.assert_class('session', session, String)
6694
6713
  (x = session_put_form; x.is_a?(::Io::Flow::V0::Models::SessionPutForm) ? x : ::Io::Flow::V0::Models::SessionPutForm.new(x))
6695
- r = @client.request("/sessions/#{CGI.escape(session)}").with_json(session_put_form.to_json).put
6714
+ r = @client.request("/sessions/shopify/#{CGI.escape(session)}").with_json(session_put_form.to_json).put
6696
6715
  ::Io::Flow::V0::Models::Session.from_json(r)
6697
6716
  end
6698
6717
 
6699
- def delete_by_session(session)
6718
+ def delete_shopify_by_session(session)
6700
6719
  HttpClient::Preconditions.assert_class('session', session, String)
6701
- r = @client.request("/sessions/#{CGI.escape(session)}").delete
6720
+ r = @client.request("/sessions/shopify/#{CGI.escape(session)}").delete
6702
6721
  nil
6703
6722
  end
6704
6723
 
6705
6724
  # Clears the session geo parameters
6706
- def put_clear_by_session(session)
6725
+ def put_shopify_and_clear_by_session(session)
6707
6726
  HttpClient::Preconditions.assert_class('session', session, String)
6708
- r = @client.request("/sessions/#{CGI.escape(session)}/clear").put
6727
+ r = @client.request("/sessions/shopify/#{CGI.escape(session)}/clear").put
6709
6728
  ::Io::Flow::V0::Models::Session.from_json(r)
6710
6729
  end
6711
6730
 
6712
- def put_organizations_by_session_and_organization(session, organization, session_put_form)
6731
+ def put_shopify_and_organizations_by_session_and_organization(session, organization, session_put_form)
6713
6732
  HttpClient::Preconditions.assert_class('session', session, String)
6714
6733
  HttpClient::Preconditions.assert_class('organization', organization, String)
6715
6734
  (x = session_put_form; x.is_a?(::Io::Flow::V0::Models::SessionPutForm) ? x : ::Io::Flow::V0::Models::SessionPutForm.new(x))
6716
- r = @client.request("/sessions/#{CGI.escape(session)}/organizations/#{CGI.escape(organization)}").with_json(session_put_form.to_json).put
6735
+ r = @client.request("/sessions/shopify/#{CGI.escape(session)}/organizations/#{CGI.escape(organization)}").with_json(session_put_form.to_json).put
6717
6736
  ::Io::Flow::V0::Models::OrganizationSession.new(r)
6718
6737
  end
6719
6738
 
6720
6739
  # Resets the session based on the provided geo parameters.
6721
- def put_reset_by_session(session, session_put_form)
6740
+ def put_shopify_and_reset_by_session(session, session_put_form)
6722
6741
  HttpClient::Preconditions.assert_class('session', session, String)
6723
6742
  (x = session_put_form; x.is_a?(::Io::Flow::V0::Models::SessionPutForm) ? x : ::Io::Flow::V0::Models::SessionPutForm.new(x))
6724
- r = @client.request("/sessions/#{CGI.escape(session)}/reset").with_json(session_put_form.to_json).put
6743
+ r = @client.request("/sessions/shopify/#{CGI.escape(session)}/reset").with_json(session_put_form.to_json).put
6725
6744
  ::Io::Flow::V0::Models::Session.from_json(r)
6726
6745
  end
6727
6746
 
6728
- def post_shopify_and_organizations_by_organization(organization, session_form)
6747
+ def post_organizations_by_organization(organization, session_form)
6729
6748
  HttpClient::Preconditions.assert_class('organization', organization, String)
6730
6749
  (x = session_form; x.is_a?(::Io::Flow::V0::Models::SessionForm) ? x : ::Io::Flow::V0::Models::SessionForm.new(x))
6731
- r = @client.request("/sessions/shopify/organizations/#{CGI.escape(organization)}").with_json(session_form.to_json).post
6750
+ r = @client.request("/sessions/organizations/#{CGI.escape(organization)}").with_json(session_form.to_json).post
6732
6751
  ::Io::Flow::V0::Models::OrganizationSession.new(r)
6733
6752
  end
6734
6753
 
6735
- def get_shopify_by_session(session)
6754
+ def get_by_session(session)
6736
6755
  HttpClient::Preconditions.assert_class('session', session, String)
6737
- r = @client.request("/sessions/shopify/#{CGI.escape(session)}").get
6756
+ r = @client.request("/sessions/#{CGI.escape(session)}").get
6738
6757
  ::Io::Flow::V0::Models::Session.from_json(r)
6739
6758
  end
6740
6759
 
6741
- def put_shopify_by_session(session, session_put_form)
6760
+ def put_by_session(session, session_put_form)
6742
6761
  HttpClient::Preconditions.assert_class('session', session, String)
6743
6762
  (x = session_put_form; x.is_a?(::Io::Flow::V0::Models::SessionPutForm) ? x : ::Io::Flow::V0::Models::SessionPutForm.new(x))
6744
- r = @client.request("/sessions/shopify/#{CGI.escape(session)}").with_json(session_put_form.to_json).put
6763
+ r = @client.request("/sessions/#{CGI.escape(session)}").with_json(session_put_form.to_json).put
6745
6764
  ::Io::Flow::V0::Models::Session.from_json(r)
6746
6765
  end
6747
6766
 
6748
- def delete_shopify_by_session(session)
6767
+ def delete_by_session(session)
6749
6768
  HttpClient::Preconditions.assert_class('session', session, String)
6750
- r = @client.request("/sessions/shopify/#{CGI.escape(session)}").delete
6769
+ r = @client.request("/sessions/#{CGI.escape(session)}").delete
6751
6770
  nil
6752
6771
  end
6753
6772
 
6754
6773
  # Clears the session geo parameters
6755
- def put_shopify_and_clear_by_session(session)
6774
+ def put_clear_by_session(session)
6756
6775
  HttpClient::Preconditions.assert_class('session', session, String)
6757
- r = @client.request("/sessions/shopify/#{CGI.escape(session)}/clear").put
6776
+ r = @client.request("/sessions/#{CGI.escape(session)}/clear").put
6758
6777
  ::Io::Flow::V0::Models::Session.from_json(r)
6759
6778
  end
6760
6779
 
6761
- def put_shopify_and_organizations_by_session_and_organization(session, organization, session_put_form)
6780
+ def put_organizations_by_session_and_organization(session, organization, session_put_form)
6762
6781
  HttpClient::Preconditions.assert_class('session', session, String)
6763
6782
  HttpClient::Preconditions.assert_class('organization', organization, String)
6764
6783
  (x = session_put_form; x.is_a?(::Io::Flow::V0::Models::SessionPutForm) ? x : ::Io::Flow::V0::Models::SessionPutForm.new(x))
6765
- r = @client.request("/sessions/shopify/#{CGI.escape(session)}/organizations/#{CGI.escape(organization)}").with_json(session_put_form.to_json).put
6784
+ r = @client.request("/sessions/#{CGI.escape(session)}/organizations/#{CGI.escape(organization)}").with_json(session_put_form.to_json).put
6766
6785
  ::Io::Flow::V0::Models::OrganizationSession.new(r)
6767
6786
  end
6768
6787
 
6769
6788
  # Resets the session based on the provided geo parameters.
6770
- def put_shopify_and_reset_by_session(session, session_put_form)
6789
+ def put_reset_by_session(session, session_put_form)
6771
6790
  HttpClient::Preconditions.assert_class('session', session, String)
6772
6791
  (x = session_put_form; x.is_a?(::Io::Flow::V0::Models::SessionPutForm) ? x : ::Io::Flow::V0::Models::SessionPutForm.new(x))
6773
- r = @client.request("/sessions/shopify/#{CGI.escape(session)}/reset").with_json(session_put_form.to_json).put
6792
+ r = @client.request("/sessions/#{CGI.escape(session)}/reset").with_json(session_put_form.to_json).put
6774
6793
  ::Io::Flow::V0::Models::Session.from_json(r)
6775
6794
  end
6776
6795
 
@@ -19815,7 +19834,7 @@ module Io
19815
19834
  end
19816
19835
 
19817
19836
  def SyncStreamType.ALL
19818
- @@all ||= [SyncStreamType.submitted_order]
19837
+ @@all ||= [SyncStreamType.submitted_order, SyncStreamType.placed_order]
19819
19838
  end
19820
19839
 
19821
19840
  # Represents a sync stream of submitted orders - ie each record reported
@@ -19824,6 +19843,12 @@ module Io
19824
19843
  @@_submitted_order ||= SyncStreamType.new('submitted_order')
19825
19844
  end
19826
19845
 
19846
+ # Represents a sync stream of placed orders - ie each record reported represents
19847
+ # a placed order
19848
+ def SyncStreamType.placed_order
19849
+ @@_placed_order ||= SyncStreamType.new('placed_order')
19850
+ end
19851
+
19827
19852
  def to_hash
19828
19853
  value
19829
19854
  end
@@ -20444,12 +20469,12 @@ module Io
20444
20469
  @@_foot ||= UnitOfMeasurement.new('foot')
20445
20470
  end
20446
20471
 
20447
- # A unit of volume equal to one cubic inch (in?).
20472
+ # A unit of volume equal to one cubic inch (in³).
20448
20473
  def UnitOfMeasurement.cubic_inch
20449
20474
  @@_cubic_inch ||= UnitOfMeasurement.new('cubic_inch')
20450
20475
  end
20451
20476
 
20452
- # The metric unit for volume quantities (m?).
20477
+ # The metric unit for volume quantities (m³).
20453
20478
  def UnitOfMeasurement.cubic_meter
20454
20479
  @@_cubic_meter ||= UnitOfMeasurement.new('cubic_meter')
20455
20480
  end
@@ -33034,6 +33059,70 @@ module Io
33034
33059
 
33035
33060
  end
33036
33061
 
33062
+ class GraphqlRequest
33063
+
33064
+ attr_reader :id, :query, :operation_name, :variables
33065
+
33066
+ def initialize(incoming={})
33067
+ opts = HttpClient::Helper.symbolize_keys(incoming)
33068
+ HttpClient::Preconditions.require_keys(opts, [:id, :query], 'GraphqlRequest')
33069
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
33070
+ @query = HttpClient::Preconditions.assert_class('query', opts.delete(:query), String)
33071
+ @operation_name = (x = opts.delete(:operation_name); x.nil? ? nil : HttpClient::Preconditions.assert_class('operation_name', x, String))
33072
+ @variables = (x = opts.delete(:variables); x.nil? ? nil : HttpClient::Preconditions.assert_class('variables', x, Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('variables', d[1], String); h })
33073
+ end
33074
+
33075
+ def to_json
33076
+ JSON.dump(to_hash)
33077
+ end
33078
+
33079
+ def copy(incoming={})
33080
+ GraphqlRequest.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
33081
+ end
33082
+
33083
+ def to_hash
33084
+ {
33085
+ :id => id,
33086
+ :query => query,
33087
+ :operation_name => operation_name,
33088
+ :variables => variables.nil? ? nil : variables
33089
+ }
33090
+ end
33091
+
33092
+ end
33093
+
33094
+ class GraphqlResponse
33095
+
33096
+ attr_reader :id, :request_id, :data, :errors
33097
+
33098
+ def initialize(incoming={})
33099
+ opts = HttpClient::Helper.symbolize_keys(incoming)
33100
+ HttpClient::Preconditions.require_keys(opts, [:id, :request_id, :data], 'GraphqlResponse')
33101
+ @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
33102
+ @request_id = HttpClient::Preconditions.assert_class('request_id', opts.delete(:request_id), String)
33103
+ @data = HttpClient::Preconditions.assert_class('data', HttpClient::Helper.to_object(opts.delete(:data)), Hash)
33104
+ @errors = (x = opts.delete(:errors); x.nil? ? nil : HttpClient::Preconditions.assert_class('errors', x, Array).map { |v| HttpClient::Preconditions.assert_class('errors', HttpClient::Helper.to_object(v), Hash) })
33105
+ end
33106
+
33107
+ def to_json
33108
+ JSON.dump(to_hash)
33109
+ end
33110
+
33111
+ def copy(incoming={})
33112
+ GraphqlResponse.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
33113
+ end
33114
+
33115
+ def to_hash
33116
+ {
33117
+ :id => id,
33118
+ :request_id => request_id,
33119
+ :data => data,
33120
+ :errors => errors.nil? ? nil : errors
33121
+ }
33122
+ end
33123
+
33124
+ end
33125
+
33037
33126
  class HarmonizationDocument < Document
33038
33127
 
33039
33128
  attr_reader :code, :categories, :origin
@@ -34908,12 +34997,12 @@ module Io
34908
34997
  # available
34909
34998
  class InventoryUnlimited < InventoryStrategy
34910
34999
 
34911
- attr_reader :quantity
35000
+ attr_reader :placeholder
34912
35001
 
34913
35002
  def initialize(incoming={})
34914
35003
  super(:discriminator => InventoryStrategy::Types::INVENTORY_UNLIMITED)
34915
35004
  opts = HttpClient::Helper.symbolize_keys(incoming)
34916
- @quantity = HttpClient::Preconditions.assert_class('quantity', (x = opts.delete(:quantity); x.nil? ? "unlimited" : x), String)
35005
+ @placeholder = HttpClient::Preconditions.assert_class('placeholder', (x = opts.delete(:placeholder); x.nil? ? "unlimited" : x), String)
34917
35006
  end
34918
35007
 
34919
35008
  def to_json
@@ -34926,7 +35015,7 @@ module Io
34926
35015
 
34927
35016
  def subtype_to_hash
34928
35017
  {
34929
- :quantity => quantity
35018
+ :placeholder => placeholder
34930
35019
  }
34931
35020
  end
34932
35021
 
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.81
4
+ version: 0.2.82
5
5
  platform: ruby
6
6
  authors:
7
7
  - Flow Commerce, Inc.
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-13 00:00:00.000000000 Z
11
+ date: 2020-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -39,7 +39,7 @@ homepage: https://github.com/flowcommerce/ruby-sdk
39
39
  licenses:
40
40
  - MIT
41
41
  metadata: {}
42
- post_install_message:
42
+ post_install_message:
43
43
  rdoc_options: []
44
44
  require_paths:
45
45
  - lib
@@ -54,8 +54,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0'
56
56
  requirements: []
57
- rubygems_version: 3.1.2
58
- signing_key:
57
+ rubyforge_project:
58
+ rubygems_version: 2.5.2.3
59
+ signing_key:
59
60
  specification_version: 4
60
61
  summary: Native ruby client for the Flow REST API.
61
62
  test_files: []