Method: CDEKApiClient::Entities::Location#to_json

Defined in:
lib/cdek_api_client/entities/location.rb

#to_json(*_args) ⇒ String

Converts the Location object to a JSON representation.

Returns:

  • (String)

    the JSON representation of the Location.



32
33
34
35
36
37
38
# File 'lib/cdek_api_client/entities/location.rb', line 32

def to_json(*_args)
  {
    code: @code,
    city: @city,
    address: @address
  }.to_json
end