stamps 0.3.1 → 0.3.2

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.
data/Gemfile CHANGED
@@ -1,4 +1,12 @@
1
1
  source "http://rubygems.org"
2
2
 
3
+ gem 'simplecov', '~> 0.4.0'
4
+ gem 'shoulda', '~> 2.11.3'
5
+ gem 'mocha', '~> 0.9.11'
6
+ gem 'webmock', '~> 1.6.2'
7
+ gem 'awesome_print'
8
+ gem 'yard'
9
+ gem 'bluecloth'
10
+
3
11
  # Specify your gem's dependencies in stamps.gemspec
4
12
  gemspec
@@ -20,6 +20,14 @@ module Stamps
20
20
  response = request('PurchasePostage', Stamps::Mapping::PurchasePostage.new(params))
21
21
  response[:errors].empty? ? response[:purchase_postage_response] : response
22
22
  end
23
+
24
+ # check the payment of purchase_pastage
25
+ #
26
+ def get_purchase_status(params = {})
27
+ params[:authenticator] = authenticator_token
28
+ response = request('GetPurchaseStatuee', Stamps::Mapping::GetPurchaseStatus.new(params))
29
+ response[:errors].empty? ? response[:purchase_postage_response] : response
30
+ end
23
31
 
24
32
  # Request carrier pickup
25
33
  # TODO: Should this go somewhere else?
@@ -11,6 +11,7 @@ module Stamps
11
11
 
12
12
  class Account < Hashie::Trash
13
13
  property :Authenticator, :from => :authenticator
14
+ property :PostageBalance, :from => :postage_balance
14
15
  end
15
16
 
16
17
  class AuthenticateUser < Hashie::Trash
@@ -26,6 +27,15 @@ module Stamps
26
27
  property :Username, :from => :username
27
28
  property :Password, :from => :password
28
29
  end
30
+
31
+ class PostageBalance < Hashie::Trash
32
+ property :AvailablePostage, :from => :available_postage
33
+ property :ControlTotal, :from => :control_total
34
+ end
35
+
36
+ class GetPostageStatus < Hashie::Trash
37
+ property :TransactionID, :from => :transaction_id
38
+ end
29
39
 
30
40
  class Rates < Hashie::Trash
31
41
  property :Authenticator, :from => :authenticator
@@ -107,8 +117,8 @@ module Stamps
107
117
  property :SampleOnly, :from => :sample
108
118
  property :ImageType, :from => :image_type
109
119
  property :EltronPrinterDPIType, :from => :label_resolution
110
- property :memo
111
- property :recipient_email
120
+ property :memo , :from => :memo
121
+ property :recipient_email, :from => :recipient_email
112
122
  property :deliveryNotification, :from => :notify
113
123
  property :shipmentNotificationCC, :from => :notify_crates
114
124
  property :shipmentNotificationFromCompany, :from => :notify_from_company
@@ -183,6 +193,7 @@ module Stamps
183
193
 
184
194
  class PurchasePostage < Hashie::Trash
185
195
  property :Authenticator, :from => :authenticator
196
+ property :IntegratorTxID, :from => :transaction_id
186
197
  property :PurchaseAmount, :from => :amount
187
198
  property :ControlTotal, :from => :control_total
188
199
  end
@@ -1,3 +1,3 @@
1
1
  module Stamps
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
@@ -37,4 +37,5 @@ Gem::Specification.new do |s|
37
37
  s.add_runtime_dependency('json', '~> 1.0')
38
38
  s.add_runtime_dependency('multi_json', '~> 1.0')
39
39
  s.add_runtime_dependency('hashie', '~> 1.0.0')
40
+
40
41
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stamps
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-08-29 00:00:00.000000000 Z
12
+ date: 2013-11-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: simplecov