apruve 1.1.1 → 1.1.2

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: d21a3b62543cd831797e61455cf14a4c56dcfa6e
4
- data.tar.gz: 2d408819e0d45f1ba3d8dc5a8718a5d4e69043da
3
+ metadata.gz: 47f7ecc818ee0cf07f527efb91970dcecad9ec29
4
+ data.tar.gz: 4fce1f67255250ffb15f04f6b2b1fbdd2e811e48
5
5
  SHA512:
6
- metadata.gz: 6f5197f4c7ada27283bfb88983a933f43e6128edc202288276b8938e28f0af9426b8ccb9f2084685ed7a8fd3d2b73f1c643f567f4089e852b79df3f10cdee036
7
- data.tar.gz: 1cf2c2a1337c4e578c33b99a6eafa45098045688823ebda8eda8f3d0cc540bf92d45ae14be18e4ccc6bbfa2b9a25a0f4f13709302a5a12eaf8bcfc9550596244
6
+ metadata.gz: 618a2b76d3fe548200eb0c5f041fc340f294bd914a270f25df04c2d0c95b4b1f3c119d85ee7c91a9b4eaf2e42de57a1998c2d4ebf4d50d69f18b0a9df936d526
7
+ data.tar.gz: 3a29ee9936e59f006df4a007a524fbc7ea1354f9e3f82cc66a2e42171d2b05db74841f736812f915e9fb604db47e94251047354ae9a81a0121a4dc591cebe304
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- apruve (1.1.1)
4
+ apruve (1.1.2)
5
5
  addressable (~> 2.3)
6
6
  faraday (>= 0.8.6, <= 0.9.0)
7
7
  faraday_middleware (~> 0.9)
@@ -1,6 +1,8 @@
1
1
  module Apruve
2
2
  class Shipment < Apruve::ApruveObject
3
- attr_accessor :id, :invoice_id, :amount_cents, :currency, :shipper, :shipped_at, :tracking_number, :delivered_at, :merchant_notes, :invoice_items
3
+ attr_accessor :id, :invoice_id, :amount_cents, :currency, :shipper, :shipped_at,
4
+ :tracking_number, :delivered_at, :merchant_notes, :invoice_items,
5
+ :tax_cents, :shipping_cents, :status, :merchant_shipment_id
4
6
 
5
7
  def self.find(invoice_id, id)
6
8
  response = Apruve.get("invoices/#{invoice_id}/shipments/#{id}")
@@ -36,7 +38,7 @@ module Apruve
36
38
 
37
39
  def update!
38
40
  validate
39
- response = Apruve.patch("invoices/#{self.invoice_id}/shipments/#{id}", self.to_json)
41
+ Apruve.patch("invoices/#{self.invoice_id}/shipments/#{id}", self.to_json)
40
42
  end
41
43
  end
42
44
  end
@@ -1,3 +1,3 @@
1
1
  module Apruve
2
- VERSION = '1.1.1'
2
+ VERSION = '1.1.2'
3
3
  end
@@ -13,6 +13,11 @@ describe Apruve::Shipment do
13
13
  let (:shipped_at) { '2016-11-11T00:00:00-06:00' }
14
14
  let (:delivered_at) { '2016-11-11T00:00:00-06:00' }
15
15
  let (:tracking_number) { '1234abcd' }
16
+ let (:currency) { 'USD' }
17
+ let (:tax_cents) { 1234 }
18
+ let (:shipping_cents) { 12345 }
19
+ let (:status) { 'fulfilled' }
20
+ let (:merchant_shipment_id) { 'ZZ1234567' }
16
21
  let (:shipment) do
17
22
  Apruve::Shipment.new(
18
23
  amount_cents: amount_cents,
@@ -23,6 +28,11 @@ describe Apruve::Shipment do
23
28
  shipped_at: shipped_at,
24
29
  delivered_at: delivered_at,
25
30
  tracking_number: tracking_number,
31
+ currency: currency,
32
+ tax_cents: tax_cents,
33
+ shipping_cents: shipping_cents,
34
+ status: status,
35
+ merchant_shipment_id: merchant_shipment_id
26
36
  )
27
37
  end
28
38
  subject { shipment }
@@ -37,10 +47,14 @@ describe Apruve::Shipment do
37
47
  it { should respond_to(:delivered_at) }
38
48
  it { should respond_to(:merchant_notes) }
39
49
  it { should respond_to(:invoice_items) }
50
+ it { should respond_to(:tax_cents) }
51
+ it { should respond_to(:shipping_cents) }
52
+ it { should respond_to(:status) }
53
+ it { should respond_to(:merchant_shipment_id) }
40
54
 
41
55
  describe '#to_json' do
42
56
  let(:expected) do
43
- '{"amount_cents":1234578,"merchant_notes":"foo","id":"91ac96c0ffc9577ecb634ad726b1874e","invoice_id":"2d1bd4f93a1b9ed034e36783adb29bed","shipper":"shipper name","shipped_at":"2016-11-11T00:00:00-06:00","delivered_at":"2016-11-11T00:00:00-06:00","tracking_number":"1234abcd","invoice_items":[],"currency":"USD"}'
57
+ '{"amount_cents":1234578,"merchant_notes":"foo","id":"91ac96c0ffc9577ecb634ad726b1874e","invoice_id":"2d1bd4f93a1b9ed034e36783adb29bed","shipper":"shipper name","shipped_at":"2016-11-11T00:00:00-06:00","delivered_at":"2016-11-11T00:00:00-06:00","tracking_number":"1234abcd","currency":"USD","tax_cents":1234,"shipping_cents":12345,"status":"fulfilled","merchant_shipment_id":"ZZ1234567","invoice_items":[]}'
44
58
  end
45
59
  its(:to_json) { should eq expected }
46
60
  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: 1.1.1
4
+ version: 1.1.2
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: 2016-12-29 00:00:00.000000000 Z
12
+ date: 2016-12-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler