Class: Billabear::RefundsApi
- Inherits:
-
Object
- Object
- Billabear::RefundsApi
- Defined in:
- lib/billabear/api/refunds_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_refunds_for_customer(customer_id, opts = {}) ⇒ InlineResponse2003
List Customer Refunds List Customer Refund.
-
#get_refunds_for_customer_with_http_info(customer_id, opts = {}) ⇒ Array<(InlineResponse2003, Integer, Hash)>
List Customer Refunds List Customer Refund.
-
#initialize(api_client = ApiClient.default) ⇒ RefundsApi
constructor
A new instance of RefundsApi.
-
#list_refund(opts = {}) ⇒ InlineResponse2003
List List all refund.
-
#list_refund_with_http_info(opts = {}) ⇒ Array<(InlineResponse2003, Integer, Hash)>
List List all refund.
-
#show_refund_by_id(refund_id, opts = {}) ⇒ Refund
Detail Info for a specific Refund.
-
#show_refund_by_id_with_http_info(refund_id, opts = {}) ⇒ Array<(Refund, Integer, Hash)>
Detail Info for a specific Refund.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ RefundsApi
Returns a new instance of RefundsApi.
16 17 18 |
# File 'lib/billabear/api/refunds_api.rb', line 16 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
14 15 16 |
# File 'lib/billabear/api/refunds_api.rb', line 14 def api_client @api_client end |
Instance Method Details
#get_refunds_for_customer(customer_id, opts = {}) ⇒ InlineResponse2003
List Customer Refunds List Customer Refund
27 28 29 30 |
# File 'lib/billabear/api/refunds_api.rb', line 27 def get_refunds_for_customer(customer_id, opts = {}) data, _status_code, _headers = get_refunds_for_customer_with_http_info(customer_id, opts) data end |
#get_refunds_for_customer_with_http_info(customer_id, opts = {}) ⇒ Array<(InlineResponse2003, Integer, Hash)>
List Customer Refunds List Customer Refund
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/billabear/api/refunds_api.rb', line 40 def get_refunds_for_customer_with_http_info(customer_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RefundsApi.get_refunds_for_customer ...' end # verify the required parameter 'customer_id' is set if @api_client.config.client_side_validation && customer_id.nil? fail ArgumentError, "Missing the required parameter 'customer_id' when calling RefundsApi.get_refunds_for_customer" end # resource path local_var_path = '/customer/{customerId}/refund'.sub('{' + 'customerId' + '}', customer_id.to_s) # query parameters query_params = opts[:query_params] || {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'last_key'] = opts[:'last_key'] if !opts[:'last_key'].nil? query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'InlineResponse2003' auth_names = opts[:auth_names] || ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: RefundsApi#get_refunds_for_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_refund(opts = {}) ⇒ InlineResponse2003
List List all refund
91 92 93 94 |
# File 'lib/billabear/api/refunds_api.rb', line 91 def list_refund(opts = {}) data, _status_code, _headers = list_refund_with_http_info(opts) data end |
#list_refund_with_http_info(opts = {}) ⇒ Array<(InlineResponse2003, Integer, Hash)>
List List all refund
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
# File 'lib/billabear/api/refunds_api.rb', line 103 def list_refund_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RefundsApi.list_refund ...' end # resource path local_var_path = '/refund' # query parameters query_params = opts[:query_params] || {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'last_key'] = opts[:'last_key'] if !opts[:'last_key'].nil? query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'InlineResponse2003' auth_names = opts[:auth_names] || ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: RefundsApi#list_refund\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#show_refund_by_id(refund_id, opts = {}) ⇒ Refund
Detail Info for a specific Refund
148 149 150 151 |
# File 'lib/billabear/api/refunds_api.rb', line 148 def show_refund_by_id(refund_id, opts = {}) data, _status_code, _headers = show_refund_by_id_with_http_info(refund_id, opts) data end |
#show_refund_by_id_with_http_info(refund_id, opts = {}) ⇒ Array<(Refund, Integer, Hash)>
Detail Info for a specific Refund
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 |
# File 'lib/billabear/api/refunds_api.rb', line 158 def show_refund_by_id_with_http_info(refund_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RefundsApi.show_refund_by_id ...' end # verify the required parameter 'refund_id' is set if @api_client.config.client_side_validation && refund_id.nil? fail ArgumentError, "Missing the required parameter 'refund_id' when calling RefundsApi.show_refund_by_id" end # resource path local_var_path = '/refund/{refundId}'.sub('{' + 'refundId' + '}', refund_id.to_s) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'Refund' auth_names = opts[:auth_names] || ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: RefundsApi#show_refund_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |