flowcommerce 0.0.42 → 0.0.43
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 +121 -12
- 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: 04bbbdc58da616a838ae52f320818262e6ef4f20
|
4
|
+
data.tar.gz: 4104225875ea7d310809f50b65823e8fe66d82f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d2a2751453741e63844d7aaff0c8573d63b2bc1cacfc7502ef2296adf57293f00ce4bd84645c9ea9b9b4e503400e665c018a6bf97fa7b33d392983af7972992
|
7
|
+
data.tar.gz: 27d59097c695ec8aed6eb62760f1ce4e21956a7a798604346f0dcdb63058f3b9a64f69c8744dfba6b9d876c7b6fe049eac19809ca2953a15f230952129daf617
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# Generated by apidoc - http://www.apidoc.me
|
2
|
-
# Service version: 0.1.
|
3
|
-
# apidoc:0.11.34 http://www.apidoc.me/flow/api/0.1.
|
2
|
+
# Service version: 0.1.20
|
3
|
+
# apidoc:0.11.34 http://www.apidoc.me/flow/api/0.1.20/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.34 http://www.apidoc.me/flow/api/0.1.
|
29
|
-
VERSION = '0.1.
|
28
|
+
USER_AGENT = 'apidoc:0.11.34 http://www.apidoc.me/flow/api/0.1.20/ruby_client' unless defined?(Constants::USER_AGENT)
|
29
|
+
VERSION = '0.1.20' unless defined?(Constants::VERSION)
|
30
30
|
VERSION_MAJOR = 0 unless defined?(VERSION_MAJOR)
|
31
31
|
|
32
32
|
end
|
@@ -1220,6 +1220,14 @@ module Io
|
|
1220
1220
|
::Io::Flow::V0::Models::OrganizationCurrencySetting.new(r)
|
1221
1221
|
end
|
1222
1222
|
|
1223
|
+
# Delete the organization currency setting with this id.
|
1224
|
+
def delete_by_id(organization, id)
|
1225
|
+
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1226
|
+
HttpClient::Preconditions.assert_class('id', id, String)
|
1227
|
+
r = @client.request("/#{CGI.escape(organization)}/currency/settings/#{CGI.escape(id)}").delete
|
1228
|
+
nil
|
1229
|
+
end
|
1230
|
+
|
1223
1231
|
# Provides visibility into recent changes of each object, including deletion.
|
1224
1232
|
def get_versions(organization, incoming={})
|
1225
1233
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
@@ -1772,7 +1780,8 @@ module Io
|
|
1772
1780
|
r.map { |x| ::Io::Flow::V0::Models::Card.new(x) }
|
1773
1781
|
end
|
1774
1782
|
|
1775
|
-
# Create a new card.
|
1783
|
+
# Create a new card. Note that when using JSONP to submit a card, you do not
|
1784
|
+
# need to authenticate.
|
1776
1785
|
def post(organization, card_form)
|
1777
1786
|
HttpClient::Preconditions.assert_class('organization', organization, String)
|
1778
1787
|
HttpClient::Preconditions.assert_class('card_form', card_form, ::Io::Flow::V0::Models::CardForm)
|
@@ -3563,6 +3572,7 @@ module Io
|
|
3563
3572
|
SPOT_RATE_UPSERTED = 'spot_rate_upserted' unless defined?(SPOT_RATE_UPSERTED)
|
3564
3573
|
ORGANIZATION_CURRENCY_SETTING_DELETED = 'organization_currency_setting_deleted' unless defined?(ORGANIZATION_CURRENCY_SETTING_DELETED)
|
3565
3574
|
ORGANIZATION_CURRENCY_SETTING_UPSERTED = 'organization_currency_setting_upserted' unless defined?(ORGANIZATION_CURRENCY_SETTING_UPSERTED)
|
3575
|
+
CONTRACTED_RATE_UPSERTED = 'contracted_rate_upserted' unless defined?(CONTRACTED_RATE_UPSERTED)
|
3566
3576
|
EXPERIENCE_DELETED = 'experience_deleted' unless defined?(EXPERIENCE_DELETED)
|
3567
3577
|
EXPERIENCE_UPSERTED = 'experience_upserted' unless defined?(EXPERIENCE_UPSERTED)
|
3568
3578
|
ITEM_MARGIN_DELETED = 'item_margin_deleted' unless defined?(ITEM_MARGIN_DELETED)
|
@@ -3606,6 +3616,7 @@ module Io
|
|
3606
3616
|
when Types::SPOT_RATE_UPSERTED; SpotRateUpserted.new(hash)
|
3607
3617
|
when Types::ORGANIZATION_CURRENCY_SETTING_DELETED; OrganizationCurrencySettingDeleted.new(hash)
|
3608
3618
|
when Types::ORGANIZATION_CURRENCY_SETTING_UPSERTED; OrganizationCurrencySettingUpserted.new(hash)
|
3619
|
+
when Types::CONTRACTED_RATE_UPSERTED; ContractedRateUpserted.new(hash)
|
3609
3620
|
when Types::EXPERIENCE_DELETED; ExperienceDeleted.new(hash)
|
3610
3621
|
when Types::EXPERIENCE_UPSERTED; ExperienceUpserted.new(hash)
|
3611
3622
|
when Types::ITEM_MARGIN_DELETED; ItemMarginDeleted.new(hash)
|
@@ -4448,7 +4459,7 @@ module Io
|
|
4448
4459
|
end
|
4449
4460
|
|
4450
4461
|
def EventType.ALL
|
4451
|
-
@@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.experience_deleted, EventType.experience_upserted, EventType.item_margin_deleted, EventType.item_margin_upserted, EventType.hs6_code_upserted, EventType.hs6_code_deleted, EventType.hs10_code_upserted, EventType.hs10_code_deleted, EventType.localized_item_upserted, EventType.localized_item_deleted, EventType.organization_upserted, EventType.organization_deleted]
|
4462
|
+
@@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.hs6_code_upserted, EventType.hs6_code_deleted, EventType.hs10_code_upserted, EventType.hs10_code_deleted, EventType.localized_item_upserted, EventType.localized_item_deleted, EventType.organization_upserted, EventType.organization_deleted]
|
4452
4463
|
end
|
4453
4464
|
|
4454
4465
|
def EventType.catalog_upserted
|
@@ -4515,6 +4526,10 @@ module Io
|
|
4515
4526
|
@@_organization_currency_setting_upserted ||= EventType.new('organization_currency_setting_upserted')
|
4516
4527
|
end
|
4517
4528
|
|
4529
|
+
def EventType.contracted_rate_upserted
|
4530
|
+
@@_contracted_rate_upserted ||= EventType.new('contracted_rate_upserted')
|
4531
|
+
end
|
4532
|
+
|
4518
4533
|
def EventType.experience_deleted
|
4519
4534
|
@@_experience_deleted ||= EventType.new('experience_deleted')
|
4520
4535
|
end
|
@@ -6439,12 +6454,13 @@ module Io
|
|
6439
6454
|
|
6440
6455
|
class CardForm
|
6441
6456
|
|
6442
|
-
attr_reader :number, :expiration_month, :expiration_year, :name, :cvv, :address
|
6457
|
+
attr_reader :number, :cipher, :expiration_month, :expiration_year, :name, :cvv, :address
|
6443
6458
|
|
6444
6459
|
def initialize(incoming={})
|
6445
6460
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
6446
|
-
HttpClient::Preconditions.require_keys(opts, [:
|
6447
|
-
@number = HttpClient::Preconditions.assert_class('number',
|
6461
|
+
HttpClient::Preconditions.require_keys(opts, [:expiration_month, :expiration_year, :name], 'CardForm')
|
6462
|
+
@number = (x = opts.delete(:number); x.nil? ? nil : HttpClient::Preconditions.assert_class('number', x, String))
|
6463
|
+
@cipher = (x = opts.delete(:cipher); x.nil? ? nil : HttpClient::Preconditions.assert_class('cipher', x, String))
|
6448
6464
|
@expiration_month = HttpClient::Preconditions.assert_class('expiration_month', opts.delete(:expiration_month), Integer)
|
6449
6465
|
@expiration_year = HttpClient::Preconditions.assert_class('expiration_year', opts.delete(:expiration_year), Integer)
|
6450
6466
|
@name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
|
@@ -6463,6 +6479,7 @@ module Io
|
|
6463
6479
|
def to_hash
|
6464
6480
|
{
|
6465
6481
|
:number => number,
|
6482
|
+
:cipher => cipher,
|
6466
6483
|
:expiration_month => expiration_month,
|
6467
6484
|
:expiration_year => expiration_year,
|
6468
6485
|
:name => name,
|
@@ -6689,17 +6706,18 @@ module Io
|
|
6689
6706
|
|
6690
6707
|
class CatalogItemDocument < Document
|
6691
6708
|
|
6692
|
-
attr_reader :number, :name, :categories, :experiences, :attributes
|
6709
|
+
attr_reader :number, :name, :categories, :experiences, :attributes, :images
|
6693
6710
|
|
6694
6711
|
def initialize(incoming={})
|
6695
6712
|
super(:name => Document::Types::CATALOG_ITEM_DOCUMENT)
|
6696
6713
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
6697
|
-
HttpClient::Preconditions.require_keys(opts, [:number, :name, :categories, :experiences, :attributes], 'CatalogItemDocument')
|
6714
|
+
HttpClient::Preconditions.require_keys(opts, [:number, :name, :categories, :experiences, :attributes, :images], 'CatalogItemDocument')
|
6698
6715
|
@number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
|
6699
6716
|
@name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
|
6700
6717
|
@categories = HttpClient::Preconditions.assert_class('categories', opts.delete(:categories), Array).map { |v| HttpClient::Preconditions.assert_class('categories', v, String) }
|
6701
6718
|
@experiences = HttpClient::Preconditions.assert_class('experiences', opts.delete(:experiences), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ExperienceSummary) ? x : ::Io::Flow::V0::Models::ExperienceSummary.new(x)) }
|
6702
6719
|
@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 }
|
6720
|
+
@images = (x = opts.delete(:images); x.is_a?(::Io::Flow::V0::Models::CatalogItemDocumentImages) ? x : ::Io::Flow::V0::Models::CatalogItemDocumentImages.new(x))
|
6703
6721
|
end
|
6704
6722
|
|
6705
6723
|
def to_json
|
@@ -6716,7 +6734,59 @@ module Io
|
|
6716
6734
|
:name => name,
|
6717
6735
|
:categories => categories,
|
6718
6736
|
:experiences => experiences.map { |o| o.to_hash },
|
6719
|
-
:attributes => attributes
|
6737
|
+
:attributes => attributes,
|
6738
|
+
:images => images.to_hash
|
6739
|
+
}
|
6740
|
+
end
|
6741
|
+
|
6742
|
+
end
|
6743
|
+
|
6744
|
+
class CatalogItemDocumentImage
|
6745
|
+
|
6746
|
+
attr_reader :url
|
6747
|
+
|
6748
|
+
def initialize(incoming={})
|
6749
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
6750
|
+
HttpClient::Preconditions.require_keys(opts, [:url], 'CatalogItemDocumentImage')
|
6751
|
+
@url = HttpClient::Preconditions.assert_class('url', opts.delete(:url), String)
|
6752
|
+
end
|
6753
|
+
|
6754
|
+
def to_json
|
6755
|
+
JSON.dump(to_hash)
|
6756
|
+
end
|
6757
|
+
|
6758
|
+
def copy(incoming={})
|
6759
|
+
CatalogItemDocumentImage.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
6760
|
+
end
|
6761
|
+
|
6762
|
+
def to_hash
|
6763
|
+
{
|
6764
|
+
:url => url
|
6765
|
+
}
|
6766
|
+
end
|
6767
|
+
|
6768
|
+
end
|
6769
|
+
|
6770
|
+
class CatalogItemDocumentImages
|
6771
|
+
|
6772
|
+
attr_reader :thumbnail
|
6773
|
+
|
6774
|
+
def initialize(incoming={})
|
6775
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
6776
|
+
@thumbnail = (x = opts.delete(:thumbnail); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::CatalogItemDocumentImage) ? x : ::Io::Flow::V0::Models::CatalogItemDocumentImage.new(x)))
|
6777
|
+
end
|
6778
|
+
|
6779
|
+
def to_json
|
6780
|
+
JSON.dump(to_hash)
|
6781
|
+
end
|
6782
|
+
|
6783
|
+
def copy(incoming={})
|
6784
|
+
CatalogItemDocumentImages.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
6785
|
+
end
|
6786
|
+
|
6787
|
+
def to_hash
|
6788
|
+
{
|
6789
|
+
:thumbnail => thumbnail.nil? ? nil : thumbnail.to_hash
|
6720
6790
|
}
|
6721
6791
|
end
|
6722
6792
|
|
@@ -7097,6 +7167,45 @@ module Io
|
|
7097
7167
|
|
7098
7168
|
end
|
7099
7169
|
|
7170
|
+
class ContractedRateUpserted < Event
|
7171
|
+
|
7172
|
+
attr_reader :event_id, :timestamp, :organization_id, :base, :target, :effective_at, :value
|
7173
|
+
|
7174
|
+
def initialize(incoming={})
|
7175
|
+
super(:name => Event::Types::CONTRACTED_RATE_UPSERTED)
|
7176
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
7177
|
+
HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :organization_id, :base, :target, :effective_at, :value], 'ContractedRateUpserted')
|
7178
|
+
@event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String)
|
7179
|
+
@timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
|
7180
|
+
@organization_id = HttpClient::Preconditions.assert_class('organization_id', opts.delete(:organization_id), String)
|
7181
|
+
@base = HttpClient::Preconditions.assert_class('base', opts.delete(:base), String)
|
7182
|
+
@target = HttpClient::Preconditions.assert_class('target', opts.delete(:target), String)
|
7183
|
+
@effective_at = HttpClient::Preconditions.assert_class('effective_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:effective_at)), DateTime)
|
7184
|
+
@value = HttpClient::Preconditions.assert_class('value', HttpClient::Helper.to_big_decimal(opts.delete(:value)), BigDecimal)
|
7185
|
+
end
|
7186
|
+
|
7187
|
+
def to_json
|
7188
|
+
JSON.dump(to_hash)
|
7189
|
+
end
|
7190
|
+
|
7191
|
+
def copy(incoming={})
|
7192
|
+
ContractedRateUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
7193
|
+
end
|
7194
|
+
|
7195
|
+
def subtype_to_hash
|
7196
|
+
{
|
7197
|
+
:event_id => event_id,
|
7198
|
+
:timestamp => timestamp,
|
7199
|
+
:organization_id => organization_id,
|
7200
|
+
:base => base,
|
7201
|
+
:target => target,
|
7202
|
+
:effective_at => effective_at,
|
7203
|
+
:value => value
|
7204
|
+
}
|
7205
|
+
end
|
7206
|
+
|
7207
|
+
end
|
7208
|
+
|
7100
7209
|
# Describes conversion information from a base currency to a target currency.
|
7101
7210
|
class Conversion
|
7102
7211
|
|
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.43
|
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-
|
11
|
+
date: 2016-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|