Module: TopsConnect::Owners
- Included in:
- Client
- Defined in:
- lib/tops_connect/owners.rb
Instance Method Summary collapse
-
#balance(owner_key) ⇒ Object
Method: GET Endpoint: Balance_Get Returns: Hash.
-
#charges(owner_key) ⇒ Object
Method: GET Endpoint: Charge_Get Returns: Hash.
-
#owner(owner_key) ⇒ Object
Method: GET Endpoint: Owner_Get Returns: TopsConnect::Owner.
-
#owners(property_key = nil) ⇒ Object
Method: GET Endpoint: Owner_GetList Returns: Array<TopsConnect::Owner>.
Instance Method Details
#balance(owner_key) ⇒ Object
Method: GET Endpoint: Balance_Get Returns: Hash
27 28 29 |
# File 'lib/tops_connect/owners.rb', line 27 def balance(owner_key) get "/owner/#{owner_key}/balance" end |
#charges(owner_key) ⇒ Object
Method: GET Endpoint: Charge_Get Returns: Hash
34 35 36 |
# File 'lib/tops_connect/owners.rb', line 34 def charges(owner_key) get "/charge/#{owner_key}" end |
#owner(owner_key) ⇒ Object
Method: GET Endpoint: Owner_Get Returns: TopsConnect::Owner
20 21 22 |
# File 'lib/tops_connect/owners.rb', line 20 def owner(owner_key) TopsConnect::Owner.new get("/owner/#{owner_key}") end |
#owners(property_key = nil) ⇒ Object
Method: GET Endpoint: Owner_GetList Returns: Array<TopsConnect::Owner>
8 9 10 11 12 13 14 15 |
# File 'lib/tops_connect/owners.rb', line 8 def owners(property_key = nil) query = {} query['PropertyKey'] = property_key.to_i if property_key get('/owner', query: query).map do |owner_data| TopsConnect::Owner.new owner_data end end |