class PetStore::StoreApi

Defined in:

pet_store/api/store_api.cr

Constant Summary

GET_ORDER_BY_ID_MAX_FOR_ORDER_ID = Int64.new("5")
GET_ORDER_BY_ID_MIN_FOR_ORDER_ID = Int64.new("1")

Constructors

Instance Method Summary

Constructor Detail

def self.new(api_client : PetStore::ApiClient = ApiClient.default) #

[View source]

Instance Method Detail

def api_client : ApiClient #

[View source]
def api_client=(api_client : ApiClient) #

[View source]
def build_api_request_for_delete_order(*, order_id : String | Nil = nil) : Crest::Request #

@return Crest::Request


[View source]
def build_api_request_for_get_inventory : Crest::Request #

@return Crest::Request


[View source]
def build_api_request_for_get_order_by_id(*, order_id : Int64 | Nil = nil) : Crest::Request #

@return Crest::Request


[View source]
def build_api_request_for_place_order(*, order : PetStore::Order | Nil = nil) : Crest::Request #

@return Crest::Request


[View source]
def client_side_validation(*args, **options) #

[View source]
def client_side_validation(*args, **options, &) #

[View source]
def debugging(*args, **options) #

[View source]
def debugging(*args, **options, &) #

[View source]
def delete_order(*, order_id : String | Nil = nil) : Nil #

Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @required @param order_id [String?] ID of the order that needs to be deleted @return [Nil]


[View source]
def delete_order(*, order_id : String | Nil = nil, &block : Crest::Response -> ) : Nil #

Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @required @param order_id [String?] ID of the order that needs to be deleted @return nil


[View source]
def delete_order_with_http_info(*, order_id : String | Nil = nil) : Tuple(Nil, Int32, Hash(String, Array(String) | String)) #

Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @required @param order_id [String?] ID of the order that needs to be deleted @return [Tuple(Nil, Integer, Hash)] Nil, response status code and response headers


[View source]
def get_inventory : Hash(String, Int32) #

Returns pet inventories by status Returns a map of status codes to quantities @return [Hash(String, Int32)]


[View source]
def get_inventory(&block : Crest::Response -> ) : Nil #

Returns pet inventories by status Returns a map of status codes to quantities @return nil


[View source]
def get_inventory_with_http_info : Tuple(Hash(String, Int32), Int32, Hash(String, Array(String) | String)) #

Returns pet inventories by status Returns a map of status codes to quantities @return [Tuple(Hash(String, Int32), Integer, Hash)] Hash(String, Int32), response status code and response headers


[View source]
def get_order_by_id(*, order_id : Int64 | Nil = nil) : PetStore::Order #

Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @required @param order_id [Int64?] ID of pet that needs to be fetched @return [PetStore::Order]


[View source]
def get_order_by_id(*, order_id : Int64 | Nil = nil, &block : Crest::Response -> ) : Nil #

Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @required @param order_id [Int64?] ID of pet that needs to be fetched @return nil


[View source]
def get_order_by_id_with_http_info(*, order_id : Int64 | Nil = nil) : Tuple(PetStore::Order, Int32, Hash(String, Array(String) | String)) #

Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @required @param order_id [Int64?] ID of pet that needs to be fetched @return [Tuple(PetStore::Order, Integer, Hash)] PetStore::Order, response status code and response headers


[View source]
def place_order(*, order : PetStore::Order | Nil = nil) : PetStore::Order #

Place an order for a pet

@required @param order [PetStore::Order?] order placed for purchasing the pet @return [PetStore::Order]


[View source]
def place_order(*, order : PetStore::Order | Nil = nil, &block : Crest::Response -> ) : Nil #

Place an order for a pet

@required @param order [PetStore::Order?] order placed for purchasing the pet @return nil


[View source]
def place_order_with_http_info(*, order : PetStore::Order | Nil = nil) : Tuple(PetStore::Order, Int32, Hash(String, Array(String) | String)) #

Place an order for a pet

@required @param order [PetStore::Order?] order placed for purchasing the pet @return [Tuple(PetStore::Order, Integer, Hash)] PetStore::Order, response status code and response headers


[View source]