Class: MasspayRubySdk::AttributeService
- Inherits:
-
Object
- Object
- MasspayRubySdk::AttributeService
- Defined in:
- lib/masspay_ruby_sdk/api/attribute_service.rb
Instance Method Summary collapse
-
#get_all_attrs(user_token) ⇒ Object
Get all stored user attributes GET /payout/attribute/user_token.
-
#get_attrs(user_token, destination_token, currency) ⇒ Object
Get user attributes for destination_token GET /payout/attribute/user_token/destination_token/currency.
-
#initialize(client) ⇒ AttributeService
constructor
A new instance of AttributeService.
-
#store_attrs(user_token, destination_token, currency, body) ⇒ Object
Store user attributes POST /payout/attribute/user_token/destination_token/currency.
Constructor Details
#initialize(client) ⇒ AttributeService
Returns a new instance of AttributeService.
15 16 17 |
# File 'lib/masspay_ruby_sdk/api/attribute_service.rb', line 15 def initialize(client) @client = client ||= Client.new end |
Instance Method Details
#get_all_attrs(user_token) ⇒ Object
Get all stored user attributes GET /payout/attribute/user_token
21 22 23 |
# File 'lib/masspay_ruby_sdk/api/attribute_service.rb', line 21 def get_all_attrs user_token @client.get("payout/attribute/#{user_token}") end |
#get_attrs(user_token, destination_token, currency) ⇒ Object
Get user attributes for destination_token GET /payout/attribute/user_token/destination_token/currency
36 37 38 |
# File 'lib/masspay_ruby_sdk/api/attribute_service.rb', line 36 def get_attrs user_token, destination_token, currency @client.get("payout/attribute/#{user_token}/#{destination_token}/#{currency}") end |
#store_attrs(user_token, destination_token, currency, body) ⇒ Object
Store user attributes POST /payout/attribute/user_token/destination_token/currency
28 29 30 31 32 |
# File 'lib/masspay_ruby_sdk/api/attribute_service.rb', line 28 def store_attrs user_token, destination_token, currency, body @client.post("payout/attribute/#{user_token}/#{destination_token}/#{currency}") do |req| req.body = body end end |