flowcommerce 0.0.86 → 0.0.87
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 +69 -10
- 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: d5fac48369c61fc9a60552e2754894a106256617
|
4
|
+
data.tar.gz: 8b1573907021b84afa6b144dbd861d88cd8732eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c026465e1c8ebff77cf2f483891f3670d15e6773e717ac6fc75720c18aade054d340a48d1a5a3c22cc45340e06cebbb06089c2835c7bc3c5a23605325a9891c
|
7
|
+
data.tar.gz: 334f04673e16531a7b40f88a34cb162a9d10eb4c314d935b9fac4f88bbd5e2085a9c79bf943b645462d60f23073c260accf7b9d1139e3686984cf278eabc77bf
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# Generated by apidoc - http://www.apidoc.me
|
2
2
|
# Service version: 0.1.77
|
3
|
-
# apidoc:0.11.
|
3
|
+
# apidoc:0.11.49 http://www.apidoc.me/flow/api/0.1.96/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.
|
28
|
+
USER_AGENT = 'apidoc:0.11.49 http://www.apidoc.me/flow/api/0.1.96/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
|
|
@@ -11601,7 +11601,7 @@ module Io
|
|
11601
11601
|
# format to expect and what data to update
|
11602
11602
|
class Import
|
11603
11603
|
|
11604
|
-
attr_reader :id, :type, :source_url, :status, :created_at, :started_at, :completed_at, :
|
11604
|
+
attr_reader :id, :type, :source_url, :status, :created_at, :started_at, :completed_at, :results, :deliveries
|
11605
11605
|
|
11606
11606
|
def initialize(incoming={})
|
11607
11607
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
@@ -11613,7 +11613,7 @@ module Io
|
|
11613
11613
|
@created_at = HttpClient::Preconditions.assert_class('created_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:created_at)), DateTime)
|
11614
11614
|
@started_at = (x = opts.delete(:started_at); x.nil? ? nil : HttpClient::Preconditions.assert_class('started_at', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
|
11615
11615
|
@completed_at = (x = opts.delete(:completed_at); x.nil? ? nil : HttpClient::Preconditions.assert_class('completed_at', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
|
11616
|
-
@
|
11616
|
+
@results = (x = opts.delete(:results); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::ImportResults) ? x : ::Io::Flow::V0::Models::ImportResults.new(x)))
|
11617
11617
|
@deliveries = HttpClient::Preconditions.assert_class('deliveries', opts.delete(:deliveries), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ExportDelivery) ? x : ::Io::Flow::V0::Models::ExportDelivery.from_json(x)) }
|
11618
11618
|
end
|
11619
11619
|
|
@@ -11634,7 +11634,7 @@ module Io
|
|
11634
11634
|
:created_at => created_at,
|
11635
11635
|
:started_at => started_at,
|
11636
11636
|
:completed_at => completed_at,
|
11637
|
-
:
|
11637
|
+
:results => results.nil? ? nil : results.to_hash,
|
11638
11638
|
:deliveries => deliveries.map { |o| o.to_hash }
|
11639
11639
|
}
|
11640
11640
|
end
|
@@ -11675,6 +11675,36 @@ module Io
|
|
11675
11675
|
|
11676
11676
|
end
|
11677
11677
|
|
11678
|
+
class ImportResults
|
11679
|
+
|
11680
|
+
attr_reader :number_successful, :number_errors, :url
|
11681
|
+
|
11682
|
+
def initialize(incoming={})
|
11683
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
11684
|
+
HttpClient::Preconditions.require_keys(opts, [:number_successful, :number_errors], 'ImportResults')
|
11685
|
+
@number_successful = HttpClient::Preconditions.assert_class('number_successful', opts.delete(:number_successful), Integer)
|
11686
|
+
@number_errors = HttpClient::Preconditions.assert_class('number_errors', opts.delete(:number_errors), Integer)
|
11687
|
+
@url = (x = opts.delete(:url); x.nil? ? nil : HttpClient::Preconditions.assert_class('url', x, String))
|
11688
|
+
end
|
11689
|
+
|
11690
|
+
def to_json
|
11691
|
+
JSON.dump(to_hash)
|
11692
|
+
end
|
11693
|
+
|
11694
|
+
def copy(incoming={})
|
11695
|
+
ImportResults.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
11696
|
+
end
|
11697
|
+
|
11698
|
+
def to_hash
|
11699
|
+
{
|
11700
|
+
:number_successful => number_successful,
|
11701
|
+
:number_errors => number_errors,
|
11702
|
+
:url => url
|
11703
|
+
}
|
11704
|
+
end
|
11705
|
+
|
11706
|
+
end
|
11707
|
+
|
11678
11708
|
class ImportVersion
|
11679
11709
|
|
11680
11710
|
attr_reader :id, :timestamp, :type, :import
|
@@ -15833,17 +15863,16 @@ module Io
|
|
15833
15863
|
# information primarily to support customer service workflow.
|
15834
15864
|
class RefundOrderSummary
|
15835
15865
|
|
15836
|
-
attr_reader :order_number, :currency, :captured, :refunded, :
|
15866
|
+
attr_reader :order_number, :currency, :captured, :refunded, :amounts
|
15837
15867
|
|
15838
15868
|
def initialize(incoming={})
|
15839
15869
|
opts = HttpClient::Helper.symbolize_keys(incoming)
|
15840
|
-
HttpClient::Preconditions.require_keys(opts, [:order_number, :currency, :captured, :refunded, :
|
15870
|
+
HttpClient::Preconditions.require_keys(opts, [:order_number, :currency, :captured, :refunded, :amounts], 'RefundOrderSummary')
|
15841
15871
|
@order_number = HttpClient::Preconditions.assert_class('order_number', opts.delete(:order_number), String)
|
15842
15872
|
@currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String)
|
15843
15873
|
@captured = HttpClient::Preconditions.assert_class('captured', HttpClient::Helper.to_big_decimal(opts.delete(:captured)), BigDecimal)
|
15844
15874
|
@refunded = HttpClient::Preconditions.assert_class('refunded', HttpClient::Helper.to_big_decimal(opts.delete(:refunded)), BigDecimal)
|
15845
|
-
@
|
15846
|
-
@shipping = HttpClient::Preconditions.assert_class('shipping', HttpClient::Helper.to_big_decimal(opts.delete(:shipping)), BigDecimal)
|
15875
|
+
@amounts = (x = opts.delete(:amounts); x.is_a?(::Io::Flow::V0::Models::RefundOrderSummaryAmounts) ? x : ::Io::Flow::V0::Models::RefundOrderSummaryAmounts.new(x))
|
15847
15876
|
end
|
15848
15877
|
|
15849
15878
|
def to_json
|
@@ -15860,7 +15889,37 @@ module Io
|
|
15860
15889
|
:currency => currency,
|
15861
15890
|
:captured => captured,
|
15862
15891
|
:refunded => refunded,
|
15863
|
-
:
|
15892
|
+
:amounts => amounts.to_hash
|
15893
|
+
}
|
15894
|
+
end
|
15895
|
+
|
15896
|
+
end
|
15897
|
+
|
15898
|
+
# Detailed examples of amount to refund following common ecommerce use cases.
|
15899
|
+
class RefundOrderSummaryAmounts
|
15900
|
+
|
15901
|
+
attr_reader :balance, :balance_excluding_shipping, :shipping
|
15902
|
+
|
15903
|
+
def initialize(incoming={})
|
15904
|
+
opts = HttpClient::Helper.symbolize_keys(incoming)
|
15905
|
+
HttpClient::Preconditions.require_keys(opts, [:balance], 'RefundOrderSummaryAmounts')
|
15906
|
+
@balance = HttpClient::Preconditions.assert_class('balance', HttpClient::Helper.to_big_decimal(opts.delete(:balance)), BigDecimal)
|
15907
|
+
@balance_excluding_shipping = (x = opts.delete(:balance_excluding_shipping); x.nil? ? nil : HttpClient::Preconditions.assert_class('balance_excluding_shipping', HttpClient::Helper.to_big_decimal(x), BigDecimal))
|
15908
|
+
@shipping = (x = opts.delete(:shipping); x.nil? ? nil : HttpClient::Preconditions.assert_class('shipping', HttpClient::Helper.to_big_decimal(x), BigDecimal))
|
15909
|
+
end
|
15910
|
+
|
15911
|
+
def to_json
|
15912
|
+
JSON.dump(to_hash)
|
15913
|
+
end
|
15914
|
+
|
15915
|
+
def copy(incoming={})
|
15916
|
+
RefundOrderSummaryAmounts.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
|
15917
|
+
end
|
15918
|
+
|
15919
|
+
def to_hash
|
15920
|
+
{
|
15921
|
+
:balance => balance,
|
15922
|
+
:balance_excluding_shipping => balance_excluding_shipping,
|
15864
15923
|
:shipping => shipping
|
15865
15924
|
}
|
15866
15925
|
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.87
|
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-
|
11
|
+
date: 2016-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|