flowcommerce 0.0.68 → 0.0.69
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/flow_commerce/flow_api_v0_client.rb +248 -155
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14c36d47b91c27d5bbd5b21fccec6343f92bdb28
|
4
|
+
data.tar.gz: 5a9a3fea67992879f74b6da2538d24fc332e3bbe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d17db944f5dd939af7e20ea963fd80b772475178a513da3434cb331d679dd32a874b72c8ba466d5db16284a95ddba11d07bfb6107a9d1db40f7bfcdb5fa1d93c
|
7
|
+
data.tar.gz: 2cd98c257751529e8f330f3d2a6f5c3092854908f07dc11f3261517227f1a32ac1d1626d264ac3805695d01c468d9fd297dedf15c252c7bdddae110df52981e5
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# Generated by apidoc - http://www.apidoc.me
|
2
2
|
# Service version: 0.1.72
|
3
|
-
# apidoc:0.11.37 http://www.apidoc.me/flow/api/0.1.
|
3
|
+
# apidoc:0.11.37 http://www.apidoc.me/flow/api/0.1.72/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.37 http://www.apidoc.me/flow/api/0.1.
|
28
|
+
USER_AGENT = 'apidoc:0.11.37 http://www.apidoc.me/flow/api/0.1.72/ruby_client' unless defined?(Constants::USER_AGENT)
|
29
29
|
VERSION = '0.1.72' unless defined?(Constants::VERSION)
|
30
30
|
VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
|
31
31
|
|
@@ -85,6 +85,10 @@ module Io
|
|
85
85
|
@order_estimates ||= ::Io::Flow::V0::Clients::OrderEstimates.new(self)
|
86
86
|
end
|
87
87
|
|
88
|
+
def organizations
|
89
|
+
@organizations ||= ::Io::Flow::V0::Clients::Organizations.new(self)
|
90
|
+
end
|
91
|
+
|
88
92
|
def queries
|
89
93
|
@queries ||= ::Io::Flow::V0::Clients::Queries.new(self)
|
90
94
|
end
|
@@ -293,10 +297,6 @@ module Io
|
|
293
297
|
@memberships ||= ::Io::Flow::V0::Clients::Memberships.new(self)
|
294
298
|
end
|
295
299
|
|
296
|
-
def organizations
|
297
|
-
@organizations ||= ::Io::Flow::V0::Clients::Organizations.new(self)
|
298
|
-
end
|
299
|
-
|
300
300
|
def organization_authorizations
|
301
301
|
@organization_authorizations ||= ::Io::Flow::V0::Clients::OrganizationAuthorizations.new(self)
|
302
302
|
end
|
@@ -313,12 +313,12 @@ module Io
|
|
313
313
|
@tokens ||= ::Io::Flow::V0::Clients::Tokens.new(self)
|
314
314
|
end
|
315
315
|
|
316
|
-
def
|
317
|
-
@
|
316
|
+
def token_validations
|
317
|
+
@token_validations ||= ::Io::Flow::V0::Clients::TokenValidations.new(self)
|
318
318
|
end
|
319
319
|
|
320
|
-
def
|
321
|
-
@
|
320
|
+
def users
|
321
|
+
@users ||= ::Io::Flow::V0::Clients::Users.new(self)
|
322
322
|
end
|
323
323
|
end
|
324
324
|
|
@@ -827,6 +827,87 @@ module Io
|
|
827
827
|
|
828
828
|
end
|
829
829
|
|
830
|
+
class Organizations
|
831
|
+
|
832
|
+
def initialize(client)
|
833
|
+
@client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
|
834
|
+
end
|
835
|
+
|
836
|
+
# Provides a list of countries that can be shipped to by the organization
|
837
|
+
def get(organization)
|
838
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
839
|
+
r = @client.request("/#{CGI.escape(organization)}/countries").get
|
840
|
+
r.map { |x| ::Io::Flow::V0::Models::Country.new(x) }
|
841
|
+
end
|
842
|
+
|
843
|
+
# Search organizations. Always paginated.
|
844
|
+
def get_organizations(incoming={})
|
845
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
846
|
+
query = {
|
847
|
+
:id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
|
848
|
+
:name => (x = opts.delete(:name); x.nil? ? nil : HttpClient::Preconditions.assert_class('name', x, String)),
|
849
|
+
:environment => (x = opts.delete(:environment); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Environment) ? x : ::Io::Flow::V0::Models::Environment.apply(x)).value),
|
850
|
+
:parent => (x = opts.delete(:parent); x.nil? ? nil : HttpClient::Preconditions.assert_class('parent', x, String)),
|
851
|
+
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
852
|
+
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
853
|
+
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "name" : x), String)
|
854
|
+
}.delete_if { |k, v| v.nil? }
|
855
|
+
r = @client.request("/organizations").with_query(query).get
|
856
|
+
r.map { |x| ::Io::Flow::V0::Models::Organization.new(x) }
|
857
|
+
end
|
858
|
+
|
859
|
+
# Create a new organization.
|
860
|
+
def post_organizations(organization_form)
|
861
|
+
HttpClient::Preconditions.assert_class('organization_form', organization_form, ::Io::Flow::V0::Models::OrganizationForm)
|
862
|
+
r = @client.request("/organizations").with_json(organization_form.to_json).post
|
863
|
+
::Io::Flow::V0::Models::Organization.new(r)
|
864
|
+
end
|
865
|
+
|
866
|
+
# Returns information about a specific organization.
|
867
|
+
def get_organizations_by_id(id)
|
868
|
+
HttpClient::Preconditions.assert_class('id', id, String)
|
869
|
+
r = @client.request("/organizations/#{CGI.escape(id)}").get
|
870
|
+
::Io::Flow::V0::Models::Organization.new(r)
|
871
|
+
end
|
872
|
+
|
873
|
+
# Update or create an organization with the specified id.
|
874
|
+
def put_organizations_by_id(id, organization_put_form)
|
875
|
+
HttpClient::Preconditions.assert_class('id', id, String)
|
876
|
+
HttpClient::Preconditions.assert_class('organization_put_form', organization_put_form, ::Io::Flow::V0::Models::OrganizationPutForm)
|
877
|
+
r = @client.request("/organizations/#{CGI.escape(id)}").with_json(organization_put_form.to_json).put
|
878
|
+
::Io::Flow::V0::Models::Organization.new(r)
|
879
|
+
end
|
880
|
+
|
881
|
+
# Delete the organization with this id
|
882
|
+
def delete_organizations_by_id(id)
|
883
|
+
HttpClient::Preconditions.assert_class('id', id, String)
|
884
|
+
r = @client.request("/organizations/#{CGI.escape(id)}").delete
|
885
|
+
nil
|
886
|
+
end
|
887
|
+
|
888
|
+
# Returns currencies for a specific organization.
|
889
|
+
def get_organizations_and_settings_and_currencies_by_organization_id(organization_id)
|
890
|
+
HttpClient::Preconditions.assert_class('organization_id', organization_id, String)
|
891
|
+
r = @client.request("/organizations/#{CGI.escape(organization_id)}/settings/currencies").get
|
892
|
+
r.map { |x| ::Io::Flow::V0::Models::Currency.new(x) }
|
893
|
+
end
|
894
|
+
|
895
|
+
# Provides visibility into recent changes of each object, including deletion
|
896
|
+
def get_organizations_and_versions(incoming={})
|
897
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
898
|
+
query = {
|
899
|
+
:id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
|
900
|
+
:organization => (x = opts.delete(:organization); x.nil? ? nil : HttpClient::Preconditions.assert_class('organization', x, Array).map { |v| HttpClient::Preconditions.assert_class('organization', v, String) }),
|
901
|
+
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
902
|
+
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
903
|
+
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
|
904
|
+
}.delete_if { |k, v| v.nil? }
|
905
|
+
r = @client.request("/organizations/versions").with_query(query).get
|
906
|
+
r.map { |x| ::Io::Flow::V0::Models::OrganizationVersion.new(x) }
|
907
|
+
end
|
908
|
+
|
909
|
+
end
|
910
|
+
|
830
911
|
class Queries
|
831
912
|
|
832
913
|
def initialize(client)
|
@@ -3274,80 +3355,6 @@ module Io
|
|
3274
3355
|
|
3275
3356
|
end
|
3276
3357
|
|
3277
|
-
class Organizations
|
3278
|
-
|
3279
|
-
def initialize(client)
|
3280
|
-
@client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
|
3281
|
-
end
|
3282
|
-
|
3283
|
-
# Search organizations. Always paginated.
|
3284
|
-
def get(incoming={})
|
3285
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
3286
|
-
query = {
|
3287
|
-
:id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
|
3288
|
-
:name => (x = opts.delete(:name); x.nil? ? nil : HttpClient::Preconditions.assert_class('name', x, String)),
|
3289
|
-
:environment => (x = opts.delete(:environment); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::Environment) ? x : ::Io::Flow::V0::Models::Environment.apply(x)).value),
|
3290
|
-
:parent => (x = opts.delete(:parent); x.nil? ? nil : HttpClient::Preconditions.assert_class('parent', x, String)),
|
3291
|
-
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
3292
|
-
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
3293
|
-
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "name" : x), String)
|
3294
|
-
}.delete_if { |k, v| v.nil? }
|
3295
|
-
r = @client.request("/organizations").with_query(query).get
|
3296
|
-
r.map { |x| ::Io::Flow::V0::Models::Organization.new(x) }
|
3297
|
-
end
|
3298
|
-
|
3299
|
-
# Create a new organization.
|
3300
|
-
def post(organization_form)
|
3301
|
-
HttpClient::Preconditions.assert_class('organization_form', organization_form, ::Io::Flow::V0::Models::OrganizationForm)
|
3302
|
-
r = @client.request("/organizations").with_json(organization_form.to_json).post
|
3303
|
-
::Io::Flow::V0::Models::Organization.new(r)
|
3304
|
-
end
|
3305
|
-
|
3306
|
-
# Returns information about a specific organization.
|
3307
|
-
def get_by_id(id)
|
3308
|
-
HttpClient::Preconditions.assert_class('id', id, String)
|
3309
|
-
r = @client.request("/organizations/#{CGI.escape(id)}").get
|
3310
|
-
::Io::Flow::V0::Models::Organization.new(r)
|
3311
|
-
end
|
3312
|
-
|
3313
|
-
# Update or create an organization with the specified id.
|
3314
|
-
def put_by_id(id, organization_put_form)
|
3315
|
-
HttpClient::Preconditions.assert_class('id', id, String)
|
3316
|
-
HttpClient::Preconditions.assert_class('organization_put_form', organization_put_form, ::Io::Flow::V0::Models::OrganizationPutForm)
|
3317
|
-
r = @client.request("/organizations/#{CGI.escape(id)}").with_json(organization_put_form.to_json).put
|
3318
|
-
::Io::Flow::V0::Models::Organization.new(r)
|
3319
|
-
end
|
3320
|
-
|
3321
|
-
# Delete the organization with this id
|
3322
|
-
def delete_by_id(id)
|
3323
|
-
HttpClient::Preconditions.assert_class('id', id, String)
|
3324
|
-
r = @client.request("/organizations/#{CGI.escape(id)}").delete
|
3325
|
-
nil
|
3326
|
-
end
|
3327
|
-
|
3328
|
-
# Returns currencies for a specific organization.
|
3329
|
-
def get_settings_and_currencies_by_organization_id(organization_id)
|
3330
|
-
HttpClient::Preconditions.assert_class('organization_id', organization_id, String)
|
3331
|
-
r = @client.request("/organizations/#{CGI.escape(organization_id)}/settings/currencies").get
|
3332
|
-
r.map { |x| ::Io::Flow::V0::Models::Currency.new(x) }
|
3333
|
-
end
|
3334
|
-
|
3335
|
-
# Provides visibility into recent changes of each object, including deletion
|
3336
|
-
def get_versions(incoming={})
|
3337
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
3338
|
-
query = {
|
3339
|
-
:id => (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, Array).map { |v| HttpClient::Preconditions.assert_class('id', v, String) }),
|
3340
|
-
:organization => (x = opts.delete(:organization); x.nil? ? nil : HttpClient::Preconditions.assert_class('organization', x, Array).map { |v| HttpClient::Preconditions.assert_class('organization', v, String) }),
|
3341
|
-
:limit => HttpClient::Preconditions.assert_class('limit', (x = opts.delete(:limit); x.nil? ? 25 : x), Integer),
|
3342
|
-
:offset => HttpClient::Preconditions.assert_class('offset', (x = opts.delete(:offset); x.nil? ? 0 : x), Integer),
|
3343
|
-
:sort => HttpClient::Preconditions.assert_class('sort', (x = opts.delete(:sort); x.nil? ? "journal_timestamp" : x), String)
|
3344
|
-
}.delete_if { |k, v| v.nil? }
|
3345
|
-
r = @client.request("/organizations/versions").with_query(query).get
|
3346
|
-
r.map { |x| ::Io::Flow::V0::Models::OrganizationVersion.new(x) }
|
3347
|
-
end
|
3348
|
-
|
3349
|
-
end
|
3350
|
-
|
3351
3358
|
class OrganizationAuthorizations
|
3352
3359
|
|
3353
3360
|
def initialize(client)
|
@@ -3501,6 +3508,20 @@ module Io
|
|
3501
3508
|
|
3502
3509
|
end
|
3503
3510
|
|
3511
|
+
class TokenValidations
|
3512
|
+
|
3513
|
+
def initialize(client)
|
3514
|
+
@client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
|
3515
|
+
end
|
3516
|
+
|
3517
|
+
def post(token_validation_form)
|
3518
|
+
HttpClient::Preconditions.assert_class('token_validation_form', token_validation_form, ::Io::Flow::V0::Models::TokenValidationForm)
|
3519
|
+
r = @client.request("/token-validations").with_json(token_validation_form.to_json).post
|
3520
|
+
::Io::Flow::V0::Models::TokenValidation.new(r)
|
3521
|
+
end
|
3522
|
+
|
3523
|
+
end
|
3524
|
+
|
3504
3525
|
class Users
|
3505
3526
|
|
3506
3527
|
def initialize(client)
|
@@ -3581,20 +3602,6 @@ module Io
|
|
3581
3602
|
|
3582
3603
|
end
|
3583
3604
|
|
3584
|
-
class Validations
|
3585
|
-
|
3586
|
-
def initialize(client)
|
3587
|
-
@client = HttpClient::Preconditions.assert_class('client', client, ::Io::Flow::V0::Client)
|
3588
|
-
end
|
3589
|
-
|
3590
|
-
def post(validation_form)
|
3591
|
-
HttpClient::Preconditions.assert_class('validation_form', validation_form, ::Io::Flow::V0::Models::ValidationForm)
|
3592
|
-
r = @client.request("/token-validations").with_json(validation_form.to_json).post
|
3593
|
-
::Io::Flow::V0::Models::Validation.new(r)
|
3594
|
-
end
|
3595
|
-
|
3596
|
-
end
|
3597
|
-
|
3598
3605
|
end
|
3599
3606
|
|
3600
3607
|
module Models
|
@@ -3765,6 +3772,8 @@ module Io
|
|
3765
3772
|
CATALOG_ITEM_DELETED = 'catalog_item_deleted' unless defined?(CATALOG_ITEM_DELETED)
|
3766
3773
|
SUBCATALOG_ITEM_UPSERTED = 'subcatalog_item_upserted' unless defined?(SUBCATALOG_ITEM_UPSERTED)
|
3767
3774
|
SUBCATALOG_ITEM_DELETED = 'subcatalog_item_deleted' unless defined?(SUBCATALOG_ITEM_DELETED)
|
3775
|
+
TARGETING_ITEM_UPSERTED = 'targeting_item_upserted' unless defined?(TARGETING_ITEM_UPSERTED)
|
3776
|
+
TARGETING_ITEM_DELETED = 'targeting_item_deleted' unless defined?(TARGETING_ITEM_DELETED)
|
3768
3777
|
FLOW_CURRENCY_SETTING_DELETED = 'flow_currency_setting_deleted' unless defined?(FLOW_CURRENCY_SETTING_DELETED)
|
3769
3778
|
FLOW_CURRENCY_SETTING_UPSERTED = 'flow_currency_setting_upserted' unless defined?(FLOW_CURRENCY_SETTING_UPSERTED)
|
3770
3779
|
RATE_DELETED = 'rate_deleted' unless defined?(RATE_DELETED)
|
@@ -3822,6 +3831,8 @@ module Io
|
|
3822
3831
|
when Types::CATALOG_ITEM_DELETED; CatalogItemDeleted.new(hash)
|
3823
3832
|
when Types::SUBCATALOG_ITEM_UPSERTED; SubcatalogItemUpserted.new(hash)
|
3824
3833
|
when Types::SUBCATALOG_ITEM_DELETED; SubcatalogItemDeleted.new(hash)
|
3834
|
+
when Types::TARGETING_ITEM_UPSERTED; TargetingItemUpserted.new(hash)
|
3835
|
+
when Types::TARGETING_ITEM_DELETED; TargetingItemDeleted.new(hash)
|
3825
3836
|
when Types::FLOW_CURRENCY_SETTING_DELETED; FlowCurrencySettingDeleted.new(hash)
|
3826
3837
|
when Types::FLOW_CURRENCY_SETTING_UPSERTED; FlowCurrencySettingUpserted.new(hash)
|
3827
3838
|
when Types::RATE_DELETED; RateDeleted.new(hash)
|
@@ -4997,7 +5008,7 @@ module Io
|
|
4997
5008
|
end
|
4998
5009
|
|
4999
5010
|
def EventType.ALL
|
5000
|
-
@@all ||= [EventType.catalog_upserted, EventType.catalog_deleted, EventType.subcatalog_upserted, EventType.subcatalog_deleted, EventType.catalog_item_upserted, EventType.catalog_item_deleted, EventType.subcatalog_item_upserted, EventType.subcatalog_item_deleted, EventType.flow_currency_setting_deleted, EventType.flow_currency_setting_upserted, EventType.rate_deleted, EventType.rate_upserted, EventType.spot_rate_deleted, EventType.spot_rate_upserted, EventType.organization_currency_setting_deleted, EventType.organization_currency_setting_upserted, EventType.contracted_rate_upserted, EventType.experience_deleted, EventType.experience_upserted, EventType.item_margin_deleted, EventType.item_margin_upserted, EventType.order_deleted, EventType.order_upserted, EventType.order_booking_deleted, EventType.order_booking_upserted, EventType.hs6_code_upserted, EventType.hs6_code_deleted, EventType.hs10_code_upserted, EventType.hs10_code_deleted, EventType.label_upserted, EventType.localized_item_upserted, EventType.localized_item_deleted, EventType.localized_item_snapshot, EventType.organization_upserted, EventType.organization_deleted, EventType.authorization_upserted, EventType.authorization_deleted, EventType.capture_upserted, EventType.card_upserted, EventType.card_deleted, EventType.refund_upserted, EventType.tracking_label_event_upserted]
|
5011
|
+
@@all ||= [EventType.catalog_upserted, EventType.catalog_deleted, EventType.subcatalog_upserted, EventType.subcatalog_deleted, EventType.catalog_item_upserted, EventType.catalog_item_deleted, EventType.subcatalog_item_upserted, EventType.subcatalog_item_deleted, EventType.targeting_item_upserted, EventType.targeting_item_deleted, EventType.flow_currency_setting_deleted, EventType.flow_currency_setting_upserted, EventType.rate_deleted, EventType.rate_upserted, EventType.spot_rate_deleted, EventType.spot_rate_upserted, EventType.organization_currency_setting_deleted, EventType.organization_currency_setting_upserted, EventType.contracted_rate_upserted, EventType.experience_deleted, EventType.experience_upserted, EventType.item_margin_deleted, EventType.item_margin_upserted, EventType.order_deleted, EventType.order_upserted, EventType.order_booking_deleted, EventType.order_booking_upserted, EventType.hs6_code_upserted, EventType.hs6_code_deleted, EventType.hs10_code_upserted, EventType.hs10_code_deleted, EventType.label_upserted, EventType.localized_item_upserted, EventType.localized_item_deleted, EventType.localized_item_snapshot, EventType.organization_upserted, EventType.organization_deleted, EventType.authorization_upserted, EventType.authorization_deleted, EventType.capture_upserted, EventType.card_upserted, EventType.card_deleted, EventType.refund_upserted, EventType.tracking_label_event_upserted]
|
5001
5012
|
end
|
5002
5013
|
|
5003
5014
|
def EventType.catalog_upserted
|
@@ -5032,6 +5043,14 @@ module Io
|
|
5032
5043
|
@@_subcatalog_item_deleted ||= EventType.new('subcatalog_item_deleted')
|
5033
5044
|
end
|
5034
5045
|
|
5046
|
+
def EventType.targeting_item_upserted
|
5047
|
+
@@_targeting_item_upserted ||= EventType.new('targeting_item_upserted')
|
5048
|
+
end
|
5049
|
+
|
5050
|
+
def EventType.targeting_item_deleted
|
5051
|
+
@@_targeting_item_deleted ||= EventType.new('targeting_item_deleted')
|
5052
|
+
end
|
5053
|
+
|
5035
5054
|
def EventType.flow_currency_setting_deleted
|
5036
5055
|
@@_flow_currency_setting_deleted ||= EventType.new('flow_currency_setting_deleted')
|
5037
5056
|
end
|
@@ -15794,6 +15813,80 @@ module Io
|
|
15794
15813
|
|
15795
15814
|
end
|
15796
15815
|
|
15816
|
+
class TargetingItemDeleted < Event
|
15817
|
+
|
15818
|
+
attr_reader :event_id, :timestamp, :organization, :catalog, :number, :key
|
15819
|
+
|
15820
|
+
def initialize(incoming={})
|
15821
|
+
super(:name => Event::Types::TARGETING_ITEM_DELETED)
|
15822
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
15823
|
+
HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :catalog, :number, :key], 'TargetingItemDeleted')
|
15824
|
+
@event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
|
15825
|
+
@timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
|
15826
|
+
@organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
|
15827
|
+
@catalog = HttpClient::Preconditions.assert_class('catalog', opts.delete(:catalog), String)
|
15828
|
+
@number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
|
15829
|
+
@key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
|
15830
|
+
end
|
15831
|
+
|
15832
|
+
def to_json
|
15833
|
+
JSON.dump(to_hash)
|
15834
|
+
end
|
15835
|
+
|
15836
|
+
def copy(incoming={})
|
15837
|
+
TargetingItemDeleted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
15838
|
+
end
|
15839
|
+
|
15840
|
+
def subtype_to_hash
|
15841
|
+
{
|
15842
|
+
:event_id => event_id,
|
15843
|
+
:timestamp => timestamp,
|
15844
|
+
:organization => organization,
|
15845
|
+
:catalog => catalog,
|
15846
|
+
:number => number,
|
15847
|
+
:key => key
|
15848
|
+
}
|
15849
|
+
end
|
15850
|
+
|
15851
|
+
end
|
15852
|
+
|
15853
|
+
class TargetingItemUpserted < Event
|
15854
|
+
|
15855
|
+
attr_reader :event_id, :timestamp, :organization, :catalog, :number, :key
|
15856
|
+
|
15857
|
+
def initialize(incoming={})
|
15858
|
+
super(:name => Event::Types::TARGETING_ITEM_UPSERTED)
|
15859
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
15860
|
+
HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization, :catalog, :number, :key], 'TargetingItemUpserted')
|
15861
|
+
@event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
|
15862
|
+
@timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
|
15863
|
+
@organization = HttpClient::Preconditions.assert_class('organization', opts.delete(:organization), String)
|
15864
|
+
@catalog = HttpClient::Preconditions.assert_class('catalog', opts.delete(:catalog), String)
|
15865
|
+
@number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
|
15866
|
+
@key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String)
|
15867
|
+
end
|
15868
|
+
|
15869
|
+
def to_json
|
15870
|
+
JSON.dump(to_hash)
|
15871
|
+
end
|
15872
|
+
|
15873
|
+
def copy(incoming={})
|
15874
|
+
TargetingItemUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
15875
|
+
end
|
15876
|
+
|
15877
|
+
def subtype_to_hash
|
15878
|
+
{
|
15879
|
+
:event_id => event_id,
|
15880
|
+
:timestamp => timestamp,
|
15881
|
+
:organization => organization,
|
15882
|
+
:catalog => catalog,
|
15883
|
+
:number => number,
|
15884
|
+
:key => key
|
15885
|
+
}
|
15886
|
+
end
|
15887
|
+
|
15888
|
+
end
|
15889
|
+
|
15797
15890
|
# Represents a simple model of taxes that apply to a given item / destination.
|
15798
15891
|
class Tax
|
15799
15892
|
|
@@ -16348,6 +16441,61 @@ module Io
|
|
16348
16441
|
|
16349
16442
|
end
|
16350
16443
|
|
16444
|
+
# Model used to report whether or not a given token is valid
|
16445
|
+
class TokenValidation
|
16446
|
+
|
16447
|
+
attr_reader :status
|
16448
|
+
|
16449
|
+
def initialize(incoming={})
|
16450
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
16451
|
+
HttpClient::Preconditions.require_keys(opts, [:status], 'TokenValidation')
|
16452
|
+
@status = HttpClient::Preconditions.assert_class('status', opts.delete(:status), String)
|
16453
|
+
end
|
16454
|
+
|
16455
|
+
def to_json
|
16456
|
+
JSON.dump(to_hash)
|
16457
|
+
end
|
16458
|
+
|
16459
|
+
def copy(incoming={})
|
16460
|
+
TokenValidation.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
16461
|
+
end
|
16462
|
+
|
16463
|
+
def to_hash
|
16464
|
+
{
|
16465
|
+
:status => status
|
16466
|
+
}
|
16467
|
+
end
|
16468
|
+
|
16469
|
+
end
|
16470
|
+
|
16471
|
+
# Defines the payload of a request to validate a token, with primary goal of
|
16472
|
+
# preventing the token from being included in an HTTP GET.
|
16473
|
+
class TokenValidationForm
|
16474
|
+
|
16475
|
+
attr_reader :token
|
16476
|
+
|
16477
|
+
def initialize(incoming={})
|
16478
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
16479
|
+
HttpClient::Preconditions.require_keys(opts, [:token], 'TokenValidationForm')
|
16480
|
+
@token = HttpClient::Preconditions.assert_class('token', opts.delete(:token), String)
|
16481
|
+
end
|
16482
|
+
|
16483
|
+
def to_json
|
16484
|
+
JSON.dump(to_hash)
|
16485
|
+
end
|
16486
|
+
|
16487
|
+
def copy(incoming={})
|
16488
|
+
TokenValidationForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
16489
|
+
end
|
16490
|
+
|
16491
|
+
def to_hash
|
16492
|
+
{
|
16493
|
+
:token => token
|
16494
|
+
}
|
16495
|
+
end
|
16496
|
+
|
16497
|
+
end
|
16498
|
+
|
16351
16499
|
class TokenVersion
|
16352
16500
|
|
16353
16501
|
attr_reader :id, :timestamp, :type, :token
|
@@ -16989,33 +17137,6 @@ module Io
|
|
16989
17137
|
|
16990
17138
|
end
|
16991
17139
|
|
16992
|
-
# Model used to report whether or not a given token is valid
|
16993
|
-
class Validation
|
16994
|
-
|
16995
|
-
attr_reader :status
|
16996
|
-
|
16997
|
-
def initialize(incoming={})
|
16998
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
16999
|
-
HttpClient::Preconditions.require_keys(opts, [:status], 'Validation')
|
17000
|
-
@status = HttpClient::Preconditions.assert_class('status', opts.delete(:status), String)
|
17001
|
-
end
|
17002
|
-
|
17003
|
-
def to_json
|
17004
|
-
JSON.dump(to_hash)
|
17005
|
-
end
|
17006
|
-
|
17007
|
-
def copy(incoming={})
|
17008
|
-
Validation.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
17009
|
-
end
|
17010
|
-
|
17011
|
-
def to_hash
|
17012
|
-
{
|
17013
|
-
:status => status
|
17014
|
-
}
|
17015
|
-
end
|
17016
|
-
|
17017
|
-
end
|
17018
|
-
|
17019
17140
|
# A validation error of some type has occured. See messages for a detailed
|
17020
17141
|
# description of the specific error or errors
|
17021
17142
|
class ValidationError < OrderError
|
@@ -17045,34 +17166,6 @@ module Io
|
|
17045
17166
|
|
17046
17167
|
end
|
17047
17168
|
|
17048
|
-
# Defines the payload of a request to validate a token, with primary goal of
|
17049
|
-
# preventing the token from being included in an HTTP GET.
|
17050
|
-
class ValidationForm
|
17051
|
-
|
17052
|
-
attr_reader :token
|
17053
|
-
|
17054
|
-
def initialize(incoming={})
|
17055
|
-
opts = HttpClient::Helper.symbolize_keys(incoming)
|
17056
|
-
HttpClient::Preconditions.require_keys(opts, [:token], 'ValidationForm')
|
17057
|
-
@token = HttpClient::Preconditions.assert_class('token', opts.delete(:token), String)
|
17058
|
-
end
|
17059
|
-
|
17060
|
-
def to_json
|
17061
|
-
JSON.dump(to_hash)
|
17062
|
-
end
|
17063
|
-
|
17064
|
-
def copy(incoming={})
|
17065
|
-
ValidationForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
17066
|
-
end
|
17067
|
-
|
17068
|
-
def to_hash
|
17069
|
-
{
|
17070
|
-
:token => token
|
17071
|
-
}
|
17072
|
-
end
|
17073
|
-
|
17074
|
-
end
|
17075
|
-
|
17076
17169
|
class Webhook
|
17077
17170
|
|
17078
17171
|
attr_reader :id, :url, :events
|
@@ -17569,7 +17662,7 @@ module Io
|
|
17569
17662
|
end
|
17570
17663
|
|
17571
17664
|
def body_json
|
17572
|
-
JSON.parse(@body)
|
17665
|
+
@body ? JSON.parse(@body) : nil
|
17573
17666
|
end
|
17574
17667
|
|
17575
17668
|
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.
|
4
|
+
version: 0.0.69
|
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-09-
|
11
|
+
date: 2016-09-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|