Module: Square::APIOperations::Retrieve

Included in:
BankAccount, Fee, Item, Merchant, Payment, Settlement
Defined in:
lib/square/api_operations/retrieve.rb

Instance Method Summary collapse

Instance Method Details

#retrieve(id, params = {}) ⇒ Square::DataType

Retrieve a resource.


10
11
12
13
14
15
16
17
18
# File 'lib/square/api_operations/retrieve.rb', line 10

def retrieve(id, params = {})
  response = Square.make_request(
    endpoint: self.generate_endpoint_url(id),
    params: params
  )

  response = Square.parse_response(response)
  @data_type.new(response)
end