apruve 0.10.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8266aa74e71fb99da6044ae2881c00e1f2a9734d
4
- data.tar.gz: 62850292f7e9f94e50af2a324988db825ea63b73
3
+ metadata.gz: ca4acc4179fdfb02a29fc9d0eb79a5dd7292c0e9
4
+ data.tar.gz: aadbe9f8aa10c6dd025ad9b9fdbf4931b7042b40
5
5
  SHA512:
6
- metadata.gz: 36f5038c42e98e319c337a83e9d3c252ef584654953223afa275780ce28400ae70645fe15ce9bf3ec23d2674f5d34bf003badccc5661c42ad2fd87e26edcfc00
7
- data.tar.gz: 188a2304a63a8040846efdd8ceb0bd8a451da4dd6b4a4fe79b192fc6fa8c8265568a0eb2466b278d51d703d70bfb22accb1e9bf318d89d01fea5f00e8fd40c35
6
+ metadata.gz: db0815354b4fb97b648c1fcd06aa22358daca85c12dab32b6a3d1ef80db2d42402c9ecb0c3ef266dabf75072800ea850c31a3246d86bcba9f2c8b142e670b916
7
+ data.tar.gz: c312cb67bc901ff1ad144aa65229ce20505e7873a530dd78e7accf6b54a4c12d057f414475ce8845067e0c57da93cf6cdc65fb360b4d201b444e3c550d9cceeb
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- apruve (0.9.2)
4
+ apruve (0.11.0)
5
5
  addressable (~> 2.3)
6
6
  faraday (>= 0.8.6, <= 0.9.0)
7
7
  faraday_middleware (~> 0.9)
@@ -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|
@@ -1,3 +1,3 @@
1
1
  module Apruve
2
- VERSION = '0.10.0'
2
+ VERSION = '0.11.0'
3
3
  end
@@ -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
- "9999ABC1234000line 1123012310A line itemsmallLINE1SKUacme, inc.http://www.apruve.com/docline 240"
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) { '527cf4d85ed1e977c89a1099197d90f00aab9eda1fd3f97538b7e0909593f07f' }
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.10.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-08 00:00:00.000000000 Z
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: