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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a2e75dc4e8b17ef75b8ef23dac8d9346af562cc8
4
- data.tar.gz: 642389dc07f10a8fe2d34127522ac38e366b2e1a
3
+ metadata.gz: cf00b87f637dce42b6bb981a10e7ef040de2fe1d
4
+ data.tar.gz: 8de4eb775d19af56fbc703b436f9e36141a614b4
5
5
  SHA512:
6
- metadata.gz: 4ed7d8ab196f786920b229a195678200b0ef81ee85df9ff9d99c93296f77a24ff4818cb045e29e1feac2bcad1bd41cdedcbd9d9e6cb22ebafc810e96b8641432
7
- data.tar.gz: b1e01981fa592148e1dccdf733e0df1d533241400dd4203e0366c3e4ab735d05305d23db8fec63cd761a5cb612aae4a1b8163bdeac40d45d8229e6b7edb519d8
6
+ metadata.gz: be3efa2b92ace9a408670ff96bc4f0857abe8e0d871c296c2d1a060a9a9af193929531123180c6965267c4f307f81dfb7c39662035b788e5ffeb2fae578d9e27
7
+ data.tar.gz: 27d5d9bbce27e63d050ba588ae2bc4558db7fa122f17d56144682720447d4c342487e0ab62da5589975e9d11ed0d37bbe245d76a4cf9820234dd7b2b54363f81
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- apruve (2.0.9)
4
+ apruve (2.0.10)
5
5
  addressable (~> 2.3)
6
6
  faraday (>= 0.8.6, <= 0.9.0)
7
7
  faraday_middleware (~> 0.9)
@@ -126,4 +126,4 @@ DEPENDENCIES
126
126
  yard
127
127
 
128
128
  BUNDLED WITH
129
- 1.17.1
129
+ 1.17.3
@@ -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
- :payment_terms, :po_number, :created_at, :updated_at, :final_state_at, :default_payment_method, :links,
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 'payment_terms', but some integrations are currently using 'payment_term'. Pass
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 payment_term
110
- self.payment_terms
109
+ def payment_terms
110
+ self.payment_term
111
111
  end
112
112
 
113
- def payment_term=(pt)
114
- self.payment_terms=pt
113
+ def payment_terms=(pt)
114
+ self.payment_term=pt
115
115
  end
116
116
  end
117
117
  end
@@ -1,3 +1,3 @@
1
1
  module Apruve
2
- VERSION = '2.0.9'
2
+ VERSION = '2.0.10'
3
3
  end
@@ -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
- payment_terms: payment_term,
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,\"payment_terms\":{\"corporate_account_id\":\"612e5383e4acc6c2213f3cae6208e868\"},\"secure_hash\":\"fffd123\"}"
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, payment_terms: payment_term }
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 '#payment_term' do
305
- let (:order) { Apruve::Order.new id: id, merchant_id: 9999, payment_terms: payment_term }
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 payment_terms' do
308
- expect(order.payment_term).to be order.payment_terms
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 '#payment_term=' do
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.payment_term = payment_term
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.9
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-04-30 00:00:00.000000000 Z
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.4.5.1
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.