apruve 0.10.0 → 0.11.0
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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/apruve/resources/payment_request.rb +2 -2
- data/lib/apruve/version.rb +1 -1
- data/spec/apruve/resources/payment_request_spec.rb +4 -3
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca4acc4179fdfb02a29fc9d0eb79a5dd7292c0e9
|
4
|
+
data.tar.gz: aadbe9f8aa10c6dd025ad9b9fdbf4931b7042b40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db0815354b4fb97b648c1fcd06aa22358daca85c12dab32b6a3d1ef80db2d42402c9ecb0c3ef266dabf75072800ea850c31a3246d86bcba9f2c8b142e670b916
|
7
|
+
data.tar.gz: c312cb67bc901ff1ad144aa65229ce20505e7873a530dd78e7accf6b54a4c12d057f414475ce8845067e0c57da93cf6cdc65fb360b4d201b444e3c550d9cceeb
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Apruve
|
2
2
|
class PaymentRequest < Apruve::ApruveObject
|
3
3
|
attr_accessor :id, :merchant_id, :merchant_order_id, :status, :amount_cents, :currency, :tax_cents,
|
4
|
-
:shipping_cents, :line_items, :api_url, :view_url, :created_at, :updated_at
|
4
|
+
:shipping_cents, :line_items, :api_url, :view_url, :created_at, :updated_at, :expire_at
|
5
5
|
|
6
6
|
def self.find(id)
|
7
7
|
response = Apruve.get("payment_requests/#{id}")
|
@@ -37,7 +37,7 @@ module Apruve
|
|
37
37
|
|
38
38
|
def value_string
|
39
39
|
# add each field in the PR
|
40
|
-
str = "#{self.merchant_id}#{self.merchant_order_id}#{self.amount_cents}#{self.currency}#{self.tax_cents}#{self.shipping_cents}"
|
40
|
+
str = "#{self.merchant_id}#{self.merchant_order_id}#{self.amount_cents}#{self.currency}#{self.tax_cents}#{self.shipping_cents}#{self.expire_at}"
|
41
41
|
|
42
42
|
# add the line items
|
43
43
|
self.line_items.each do |item|
|
data/lib/apruve/version.rb
CHANGED
@@ -32,6 +32,7 @@ describe Apruve::PaymentRequest do
|
|
32
32
|
amount_cents: 12340,
|
33
33
|
tax_cents: 0,
|
34
34
|
shipping_cents: 0,
|
35
|
+
expire_at: '2014-07-22T00:00:00+00:00',
|
35
36
|
line_items: line_items
|
36
37
|
)
|
37
38
|
end
|
@@ -51,7 +52,7 @@ describe Apruve::PaymentRequest do
|
|
51
52
|
describe '#to_json' do
|
52
53
|
let(:expected) do
|
53
54
|
"{\"merchant_id\":\"9999\",\"merchant_order_id\":\"ABC\",\"amount_cents\":12340,\"tax_cents\":0,"\
|
54
|
-
"\"shipping_cents\":0,\"line_items\":[{\"title\":\"line 1\",\"amount_cents\":\"1230\","\
|
55
|
+
"\"shipping_cents\":0,\"expire_at\":\"2014-07-22T00:00:00+00:00\",\"line_items\":[{\"title\":\"line 1\",\"amount_cents\":\"1230\","\
|
55
56
|
"\"price_ea_cents\":\"123\",\"quantity\":10,\"description\":\"A line item\",\"variant_info\":\"small\","\
|
56
57
|
"\"sku\":\"LINE1SKU\",\"vendor\":\"acme, inc.\",\"view_product_url\":\"http://www.apruve.com/doc\"},"\
|
57
58
|
"{\"title\":\"line 2\",\"amount_cents\":\"40\"}]}"
|
@@ -61,7 +62,7 @@ describe Apruve::PaymentRequest do
|
|
61
62
|
|
62
63
|
describe '#value_string' do
|
63
64
|
let(:expected) do
|
64
|
-
|
65
|
+
'9999ABC12340002014-07-22T00:00:00+00:00line 1123012310A line itemsmallLINE1SKUacme, inc.http://www.apruve.com/docline 240'
|
65
66
|
end
|
66
67
|
its(:value_string) { should eq expected }
|
67
68
|
end
|
@@ -77,7 +78,7 @@ describe Apruve::PaymentRequest do
|
|
77
78
|
end
|
78
79
|
end
|
79
80
|
describe 'with api_key' do
|
80
|
-
let (:hash) { '
|
81
|
+
let (:hash) { '7a4df9a9a47e88c3c1957853341d5e9a1abc2028ede3a0a9e4f894a2925a187f' }
|
81
82
|
let (:api_key) { 'an_api_key' }
|
82
83
|
before :each do
|
83
84
|
Apruve.configure(api_key)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: apruve
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Apruve, Inc.
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-07-
|
12
|
+
date: 2014-07-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -167,3 +167,4 @@ test_files:
|
|
167
167
|
- spec/apruve/resources/subscription_spec.rb
|
168
168
|
- spec/apruve/response/apruve_exception_middleware_spec.rb
|
169
169
|
- spec/spec_helper.rb
|
170
|
+
has_rdoc:
|