All URIs are relative to http://localhost/v3
Method | HTTP request | Description |
---|---|---|
get_offerorders_token | GET /offerorders/{token} | Returns a purchase order for a specific offer |
post_offerorders | POST /offerorders | Creates an offer order |
get_offerorders_token(token)
Returns a purchase order for a specific offer
require 'time'
require 'marqeta'
api_instance = Marqeta::OfferOrdersApi.new
token = 'token_example' # String | Order token
begin
# Returns a purchase order for a specific offer
result = api_instance.get_offerorders_token(token)
p result
rescue Marqeta::ApiError => e
puts "Error when calling OfferOrdersApi->get_offerorders_token: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> get_offerorders_token_with_http_info(token)
begin
# Returns a purchase order for a specific offer
data, status_code, headers = api_instance.get_offerorders_token_with_http_info(token)
p status_code # => 2xx
p headers # => { ... }
p data # => <OfferOrderResponse>
rescue Marqeta::ApiError => e
puts "Error when calling OfferOrdersApi->get_offerorders_token_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
token | String | Order token |
No authorization required
- Content-Type: Not defined
- Accept: application/json
post_offerorders(opts)
Creates an offer order
require 'time'
require 'marqeta'
api_instance = Marqeta::OfferOrdersApi.new
opts = {
body: Marqeta::OfferOrderRequest.new({offer_token: 'offer_token_example'}) # OfferOrderRequest |
}
begin
# Creates an offer order
result = api_instance.post_offerorders(opts)
p result
rescue Marqeta::ApiError => e
puts "Error when calling OfferOrdersApi->post_offerorders: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> post_offerorders_with_http_info(opts)
begin
# Creates an offer order
data, status_code, headers = api_instance.post_offerorders_with_http_info(opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <OfferOrderResponse>
rescue Marqeta::ApiError => e
puts "Error when calling OfferOrdersApi->post_offerorders_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
body | OfferOrderRequest | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json