apruve 2.0.9 → 2.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/apruve/resources/order.rb +6 -6
- data/lib/apruve/version.rb +1 -1
- data/spec/apruve/resources/order_spec.rb +10 -10
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf00b87f637dce42b6bb981a10e7ef040de2fe1d
|
4
|
+
data.tar.gz: 8de4eb775d19af56fbc703b436f9e36141a614b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be3efa2b92ace9a408670ff96bc4f0857abe8e0d871c296c2d1a060a9a9af193929531123180c6965267c4f307f81dfb7c39662035b788e5ffeb2fae578d9e27
|
7
|
+
data.tar.gz: 27d5d9bbce27e63d050ba588ae2bc4558db7fa122f17d56144682720447d4c342487e0ab62da5589975e9d11ed0d37bbe245d76a4cf9820234dd7b2b54363f81
|
data/Gemfile.lock
CHANGED
@@ -2,7 +2,7 @@ module Apruve
|
|
2
2
|
class Order < Apruve::ApruveObject
|
3
3
|
attr_accessor :id, :merchant_id, :shopper_id, :merchant_order_id, :status, :amount_cents, :currency, :tax_cents,
|
4
4
|
:shipping_cents, :expire_at, :order_items, :accepts_payments_via, :accepts_payment_terms,
|
5
|
-
:
|
5
|
+
:payment_term, :po_number, :created_at, :updated_at, :final_state_at, :default_payment_method, :links,
|
6
6
|
:finalize_on_create, :invoice_on_create, :secure_hash
|
7
7
|
|
8
8
|
def self.find(id)
|
@@ -104,14 +104,14 @@ module Apruve
|
|
104
104
|
Digest::SHA256.hexdigest(Apruve.client.api_key+value_string)
|
105
105
|
end
|
106
106
|
|
107
|
-
# The field is actually named '
|
107
|
+
# The field is actually named 'payment_term', but some integrations are currently using 'payment_terms'. Pass
|
108
108
|
# those requests through to the correct attribute.
|
109
|
-
def
|
110
|
-
self.
|
109
|
+
def payment_terms
|
110
|
+
self.payment_term
|
111
111
|
end
|
112
112
|
|
113
|
-
def
|
114
|
-
self.
|
113
|
+
def payment_terms=(pt)
|
114
|
+
self.payment_term=pt
|
115
115
|
end
|
116
116
|
end
|
117
117
|
end
|
data/lib/apruve/version.rb
CHANGED
@@ -41,7 +41,7 @@ describe Apruve::Order do
|
|
41
41
|
order_items: order_items,
|
42
42
|
finalize_on_create: false,
|
43
43
|
invoice_on_create: false,
|
44
|
-
|
44
|
+
payment_term: payment_term,
|
45
45
|
secure_hash: 'fffd123'
|
46
46
|
)
|
47
47
|
end
|
@@ -69,7 +69,7 @@ describe Apruve::Order do
|
|
69
69
|
"{\"merchant_id\":\"9a9c3389fdc281b5c6c8d542a7e91ff6\",\"shopper_id\":\"9bc388fd08ce2835cfeb2e630316f7f1\",\"merchant_order_id\":\"ABC\","\
|
70
70
|
"\"amount_cents\":12340,\"tax_cents\":0,\"shipping_cents\":0,\"order_items\":[{\"title\":\"line 1\",\"price_ea_cents\":\"123\",\"quantity\":10,"\
|
71
71
|
"\"description\":\"A line item\",\"variant_info\":\"small\",\"sku\":\"LINE1SKU\",\"vendor\":\"acme, inc.\",\"view_product_url\":\"http://www.apruve.com/doc\""\
|
72
|
-
"},{\"title\":\"line 2\",\"price_ea_cents\":\"40\"}],\"finalize_on_create\":false,\"invoice_on_create\":false,\"
|
72
|
+
"},{\"title\":\"line 2\",\"price_ea_cents\":\"40\"}],\"finalize_on_create\":false,\"invoice_on_create\":false,\"payment_term\":{\"corporate_account_id\":\"612e5383e4acc6c2213f3cae6208e868\"},\"secure_hash\":\"fffd123\"}"
|
73
73
|
end
|
74
74
|
its(:to_json) { should eq expected }
|
75
75
|
end
|
@@ -276,7 +276,7 @@ describe Apruve::Order do
|
|
276
276
|
|
277
277
|
describe '#update' do
|
278
278
|
let (:id) { '89ea2488fe0a5c7bb38aa7f9b088874a' }
|
279
|
-
let (:order) { Apruve::Order.new id: id, merchant_id: 9999,
|
279
|
+
let (:order) { Apruve::Order.new id: id, merchant_id: 9999, payment_term: payment_term }
|
280
280
|
describe 'success' do
|
281
281
|
let! (:stubs) do
|
282
282
|
faraday_stubs do |stub|
|
@@ -301,21 +301,21 @@ describe Apruve::Order do
|
|
301
301
|
end
|
302
302
|
end
|
303
303
|
|
304
|
-
describe '#
|
305
|
-
let (:order) { Apruve::Order.new id: id, merchant_id: 9999,
|
304
|
+
describe '#payment_terms' do
|
305
|
+
let (:order) { Apruve::Order.new id: id, merchant_id: 9999, payment_term: payment_term }
|
306
306
|
|
307
|
-
it 'returns
|
308
|
-
expect(order.
|
307
|
+
it 'returns payment_term' do
|
308
|
+
expect(order.payment_terms).to be order.payment_term
|
309
309
|
end
|
310
310
|
end
|
311
311
|
|
312
|
-
describe '#
|
312
|
+
describe '#payment_terms=' do
|
313
313
|
let (:order) { Apruve::Order.new id: id, merchant_id: 9999 }
|
314
314
|
|
315
315
|
it 'sets payment_terms' do
|
316
|
-
order.
|
316
|
+
order.payment_terms = payment_term
|
317
317
|
expect(order.payment_terms).to be payment_term
|
318
318
|
end
|
319
319
|
end
|
320
320
|
end
|
321
|
-
end
|
321
|
+
end
|
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: 2.0.
|
4
|
+
version: 2.0.10
|
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: 2019-
|
12
|
+
date: 2019-06-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -163,7 +163,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
163
163
|
version: '0'
|
164
164
|
requirements: []
|
165
165
|
rubyforge_project:
|
166
|
-
rubygems_version: 2.
|
166
|
+
rubygems_version: 2.5.2.3
|
167
167
|
signing_key:
|
168
168
|
specification_version: 4
|
169
169
|
summary: Helper library for integrating Apruve into a ruby app.
|