Module: Stamps::Client::Account
- Included in:
- Stamps::Client
- Defined in:
- lib/stamps/client/account.rb
Instance Method Summary collapse
-
#account(params = {}) ⇒ Hash
Returns information about the stamps account.
-
#carrier_pickup(params = {}) ⇒ Object
Request carrier pickup TODO: Should this go somewhere else?.
-
#get_purchase_status(params = {}) ⇒ Object
check the payment of purchase_pastage.
-
#purchase_postage(params = {}) ⇒ Object
Add funds to postage account.
Instance Method Details
#account(params = {}) ⇒ Hash
Returns information about the stamps account
10 11 12 13 14 |
# File 'lib/stamps/client/account.rb', line 10 def account(params = {}) params[:authenticator] = authenticator_token response = request('GetAccountInfo', Stamps::Mapping::Account.new(params) ) response[:errors].empty? ? response[:get_account_info_response][:account_info] : response end |
#carrier_pickup(params = {}) ⇒ Object
Request carrier pickup TODO: Should this go somewhere else?
35 36 37 38 39 |
# File 'lib/stamps/client/account.rb', line 35 def carrier_pickup(params = {}) params[:authenticator] = authenticator_token response = request('CarrierPickup', Stamps::Mapping::CarrierPickup.new(params)) response[:errors].empty? ? response[:carrier_pickup_response] : response end |
#get_purchase_status(params = {}) ⇒ Object
check the payment of purchase_pastage
26 27 28 29 30 |
# File 'lib/stamps/client/account.rb', line 26 def get_purchase_status(params = {}) params[:authenticator] = authenticator_token response = request('GetPurchaseStatuee', Stamps::Mapping::GetPurchaseStatus.new(params)) response[:errors].empty? ? response[:purchase_postage_response] : response end |
#purchase_postage(params = {}) ⇒ Object
Add funds to postage account
18 19 20 21 22 |
# File 'lib/stamps/client/account.rb', line 18 def purchase_postage(params = {}) params[:authenticator] = authenticator_token response = request('PurchasePostage', Stamps::Mapping::PurchasePostage.new(params)) response[:errors].empty? ? response[:purchase_postage_response] : response end |