square_connect 2.0.0 → 2.0.2.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (222) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +7 -0
  3. data/README.md +151 -9
  4. data/Rakefile +8 -0
  5. data/docs/Address.md +26 -0
  6. data/docs/CaptureTransactionRequest.md +11 -0
  7. data/docs/CaptureTransactionResponse.md +12 -0
  8. data/docs/Card.md +18 -0
  9. data/docs/CardBrand.md +20 -0
  10. data/docs/ChargeRequest.md +22 -0
  11. data/docs/ChargeResponse.md +13 -0
  12. data/docs/Checkout.md +20 -0
  13. data/docs/CheckoutApi.md +62 -0
  14. data/docs/Country.md +261 -0
  15. data/docs/CreateCheckoutRequest.md +18 -0
  16. data/docs/CreateCheckoutResponse.md +13 -0
  17. data/docs/CreateCustomerCardRequest.md +14 -0
  18. data/docs/CreateCustomerCardResponse.md +13 -0
  19. data/docs/CreateCustomerRequest.md +20 -0
  20. data/docs/CreateCustomerResponse.md +13 -0
  21. data/docs/CreateOrderRequest.md +13 -0
  22. data/docs/CreateOrderRequestLineItem.md +14 -0
  23. data/docs/CreateOrderRequestOrder.md +13 -0
  24. data/docs/CreateRefundRequest.md +15 -0
  25. data/docs/CreateRefundResponse.md +13 -0
  26. data/docs/Currency.md +191 -0
  27. data/docs/Customer.md +26 -0
  28. data/docs/CustomerApi.md +267 -0
  29. data/docs/CustomerCardApi.md +116 -0
  30. data/docs/CustomerGroupInfo.md +13 -0
  31. data/docs/CustomerPreferences.md +12 -0
  32. data/docs/DeleteCustomerCardRequest.md +11 -0
  33. data/docs/DeleteCustomerCardResponse.md +12 -0
  34. data/docs/DeleteCustomerRequest.md +11 -0
  35. data/docs/DeleteCustomerResponse.md +12 -0
  36. data/docs/Error.md +15 -0
  37. data/docs/ErrorCategory.md +17 -0
  38. data/docs/ErrorCode.md +83 -0
  39. data/docs/ListCustomersRequest.md +12 -0
  40. data/docs/ListCustomersResponse.md +14 -0
  41. data/docs/ListLocationsRequest.md +11 -0
  42. data/docs/ListLocationsResponse.md +13 -0
  43. data/docs/ListRefundsRequest.md +15 -0
  44. data/docs/ListRefundsResponse.md +14 -0
  45. data/docs/ListTransactionsRequest.md +15 -0
  46. data/docs/ListTransactionsResponse.md +14 -0
  47. data/docs/Location.md +16 -0
  48. data/docs/LocationApi.md +56 -0
  49. data/docs/LocationCapability.md +12 -0
  50. data/docs/Money.md +13 -0
  51. data/docs/Order.md +16 -0
  52. data/docs/OrderLineItem.md +16 -0
  53. data/docs/Refund.md +20 -0
  54. data/docs/RefundApi.md +126 -0
  55. data/docs/RefundStatus.md +15 -0
  56. data/docs/RetrieveCustomerRequest.md +11 -0
  57. data/docs/RetrieveCustomerResponse.md +13 -0
  58. data/docs/RetrieveTransactionRequest.md +11 -0
  59. data/docs/RetrieveTransactionResponse.md +13 -0
  60. data/docs/SortOrder.md +13 -0
  61. data/docs/Tender.md +22 -0
  62. data/docs/TenderCardDetails.md +14 -0
  63. data/docs/TenderCardDetailsEntryMethod.md +16 -0
  64. data/docs/TenderCardDetailsStatus.md +15 -0
  65. data/docs/TenderCashDetails.md +13 -0
  66. data/docs/TenderType.md +17 -0
  67. data/docs/Transaction.md +21 -0
  68. data/docs/TransactionApi.md +285 -0
  69. data/docs/TransactionProduct.md +19 -0
  70. data/docs/UpdateCustomerRequest.md +20 -0
  71. data/docs/UpdateCustomerResponse.md +13 -0
  72. data/docs/VoidTransactionRequest.md +11 -0
  73. data/docs/VoidTransactionResponse.md +12 -0
  74. data/lib/square_connect.rb +33 -16
  75. data/lib/square_connect/api/checkout_api.rb +82 -0
  76. data/lib/square_connect/api/customer_api.rb +121 -162
  77. data/lib/square_connect/api/customer_card_api.rb +31 -50
  78. data/lib/square_connect/api/location_api.rb +12 -20
  79. data/lib/square_connect/api/refund_api.rb +70 -90
  80. data/lib/square_connect/api/transaction_api.rb +119 -165
  81. data/lib/square_connect/api_client.rb +64 -17
  82. data/lib/square_connect/api_error.rb +7 -3
  83. data/lib/square_connect/configuration.rb +31 -1
  84. data/lib/square_connect/models/address.rb +149 -78
  85. data/lib/square_connect/models/capture_transaction_request.rb +176 -0
  86. data/lib/square_connect/models/capture_transaction_response.rb +54 -26
  87. data/lib/square_connect/models/card.rb +98 -52
  88. data/lib/square_connect/models/card_brand.rb +12 -133
  89. data/lib/square_connect/models/charge_request.rb +106 -67
  90. data/lib/square_connect/models/charge_response.rb +57 -30
  91. data/lib/square_connect/models/checkout.rb +266 -0
  92. data/lib/square_connect/models/country.rb +253 -133
  93. data/lib/square_connect/models/create_checkout_request.rb +316 -0
  94. data/lib/square_connect/models/create_checkout_response.rb +198 -0
  95. data/lib/square_connect/models/create_customer_card_request.rb +66 -35
  96. data/lib/square_connect/models/create_customer_card_response.rb +58 -31
  97. data/lib/square_connect/models/create_customer_request.rb +79 -59
  98. data/lib/square_connect/models/create_customer_response.rb +58 -31
  99. data/lib/square_connect/models/create_order_request.rb +234 -0
  100. data/lib/square_connect/models/create_order_request_line_item.rb +268 -0
  101. data/lib/square_connect/models/create_order_request_order.rb +219 -0
  102. data/lib/square_connect/models/create_refund_request.rb +79 -39
  103. data/lib/square_connect/models/create_refund_response.rb +57 -30
  104. data/lib/square_connect/models/currency.rb +183 -133
  105. data/lib/square_connect/models/customer.rb +130 -77
  106. data/lib/square_connect/models/customer_group_info.rb +206 -0
  107. data/lib/square_connect/models/customer_preferences.rb +186 -0
  108. data/lib/square_connect/models/delete_customer_card_request.rb +176 -0
  109. data/lib/square_connect/models/delete_customer_card_response.rb +55 -27
  110. data/lib/square_connect/models/delete_customer_request.rb +176 -0
  111. data/lib/square_connect/models/delete_customer_response.rb +55 -27
  112. data/lib/square_connect/models/error.rb +107 -45
  113. data/lib/square_connect/models/error_category.rb +9 -133
  114. data/lib/square_connect/models/error_code.rb +75 -133
  115. data/lib/square_connect/models/list_customers_request.rb +55 -27
  116. data/lib/square_connect/models/list_customers_response.rb +61 -35
  117. data/lib/square_connect/models/list_locations_request.rb +176 -0
  118. data/lib/square_connect/models/list_locations_response.rb +57 -30
  119. data/lib/square_connect/models/list_refunds_request.rb +91 -42
  120. data/lib/square_connect/models/list_refunds_response.rb +59 -33
  121. data/lib/square_connect/models/list_transactions_request.rb +91 -42
  122. data/lib/square_connect/models/list_transactions_response.rb +59 -33
  123. data/lib/square_connect/models/location.rb +86 -41
  124. data/lib/square_connect/models/location_capability.rb +4 -133
  125. data/lib/square_connect/models/money.rb +85 -34
  126. data/lib/square_connect/models/order.rb +228 -0
  127. data/lib/square_connect/models/order_line_item.rb +226 -0
  128. data/lib/square_connect/models/refund.rb +138 -59
  129. data/lib/square_connect/models/refund_status.rb +7 -133
  130. data/lib/square_connect/models/retrieve_customer_request.rb +176 -0
  131. data/lib/square_connect/models/retrieve_customer_response.rb +58 -31
  132. data/lib/square_connect/models/retrieve_transaction_request.rb +176 -0
  133. data/lib/square_connect/models/retrieve_transaction_response.rb +57 -30
  134. data/lib/square_connect/models/sort_order.rb +5 -133
  135. data/lib/square_connect/models/tender.rb +112 -65
  136. data/lib/square_connect/models/tender_card_details.rb +93 -40
  137. data/lib/square_connect/models/tender_card_details_entry_method.rb +8 -133
  138. data/lib/square_connect/models/tender_card_details_status.rb +7 -133
  139. data/lib/square_connect/models/tender_cash_details.rb +58 -31
  140. data/lib/square_connect/models/tender_type.rb +9 -133
  141. data/lib/square_connect/models/transaction.rb +132 -56
  142. data/lib/square_connect/models/transaction_product.rb +11 -133
  143. data/lib/square_connect/models/update_customer_request.rb +79 -59
  144. data/lib/square_connect/models/update_customer_response.rb +58 -31
  145. data/lib/square_connect/models/void_transaction_request.rb +176 -0
  146. data/lib/square_connect/models/void_transaction_response.rb +54 -26
  147. data/lib/square_connect/version.rb +2 -3
  148. data/spec/api/checkout_api_spec.rb +53 -0
  149. data/spec/api/customer_api_spec.rb +121 -0
  150. data/spec/api/customer_card_api_spec.rb +71 -0
  151. data/spec/api/location_api_spec.rb +58 -0
  152. data/spec/api/refund_api_spec.rb +75 -0
  153. data/spec/api/transaction_api_spec.rb +128 -0
  154. data/spec/api_client_spec.rb +226 -0
  155. data/spec/configuration_spec.rb +42 -0
  156. data/spec/models/address_spec.rb +186 -0
  157. data/spec/models/capture_transaction_request_spec.rb +36 -0
  158. data/spec/models/capture_transaction_response_spec.rb +46 -0
  159. data/spec/models/card_brand_spec.rb +36 -0
  160. data/spec/models/card_spec.rb +106 -0
  161. data/spec/models/charge_request_spec.rb +146 -0
  162. data/spec/models/charge_response_spec.rb +56 -0
  163. data/spec/models/checkout_spec.rb +126 -0
  164. data/spec/models/country_spec.rb +36 -0
  165. data/spec/models/create_checkout_request_spec.rb +106 -0
  166. data/spec/models/create_checkout_response_spec.rb +56 -0
  167. data/spec/models/create_customer_card_request_spec.rb +66 -0
  168. data/spec/models/create_customer_card_response_spec.rb +56 -0
  169. data/spec/models/create_customer_request_spec.rb +126 -0
  170. data/spec/models/create_customer_response_spec.rb +56 -0
  171. data/spec/models/create_order_request_line_item_spec.rb +66 -0
  172. data/spec/models/create_order_request_order_spec.rb +56 -0
  173. data/spec/models/create_order_request_spec.rb +56 -0
  174. data/spec/models/create_refund_request_spec.rb +76 -0
  175. data/spec/models/create_refund_response_spec.rb +56 -0
  176. data/spec/models/currency_spec.rb +36 -0
  177. data/spec/models/customer_group_info_spec.rb +56 -0
  178. data/spec/models/customer_preferences_spec.rb +46 -0
  179. data/spec/models/customer_spec.rb +186 -0
  180. data/spec/models/delete_customer_card_request_spec.rb +36 -0
  181. data/spec/models/delete_customer_card_response_spec.rb +46 -0
  182. data/spec/models/delete_customer_request_spec.rb +36 -0
  183. data/spec/models/delete_customer_response_spec.rb +46 -0
  184. data/spec/models/error_category_spec.rb +36 -0
  185. data/spec/models/error_code_spec.rb +36 -0
  186. data/spec/models/error_spec.rb +76 -0
  187. data/spec/models/list_customers_request_spec.rb +46 -0
  188. data/spec/models/list_customers_response_spec.rb +66 -0
  189. data/spec/models/list_locations_request_spec.rb +36 -0
  190. data/spec/models/list_locations_response_spec.rb +56 -0
  191. data/spec/models/list_refunds_request_spec.rb +76 -0
  192. data/spec/models/list_refunds_response_spec.rb +66 -0
  193. data/spec/models/list_transactions_request_spec.rb +76 -0
  194. data/spec/models/list_transactions_response_spec.rb +66 -0
  195. data/spec/models/location_capability_spec.rb +36 -0
  196. data/spec/models/location_spec.rb +86 -0
  197. data/spec/models/money_spec.rb +56 -0
  198. data/spec/models/order_line_item_spec.rb +86 -0
  199. data/spec/models/order_spec.rb +86 -0
  200. data/spec/models/refund_spec.rb +126 -0
  201. data/spec/models/refund_status_spec.rb +36 -0
  202. data/spec/models/retrieve_customer_request_spec.rb +36 -0
  203. data/spec/models/retrieve_customer_response_spec.rb +56 -0
  204. data/spec/models/retrieve_transaction_request_spec.rb +36 -0
  205. data/spec/models/retrieve_transaction_response_spec.rb +56 -0
  206. data/spec/models/sort_order_spec.rb +36 -0
  207. data/spec/models/tender_card_details_entry_method_spec.rb +36 -0
  208. data/spec/models/tender_card_details_spec.rb +66 -0
  209. data/spec/models/tender_card_details_status_spec.rb +36 -0
  210. data/spec/models/tender_cash_details_spec.rb +56 -0
  211. data/spec/models/tender_spec.rb +146 -0
  212. data/spec/models/tender_type_spec.rb +36 -0
  213. data/spec/models/transaction_product_spec.rb +36 -0
  214. data/spec/models/transaction_spec.rb +136 -0
  215. data/spec/models/update_customer_request_spec.rb +126 -0
  216. data/spec/models/update_customer_response_spec.rb +56 -0
  217. data/spec/models/void_transaction_request_spec.rb +36 -0
  218. data/spec/models/void_transaction_response_spec.rb +46 -0
  219. data/spec/spec_helper.rb +115 -0
  220. data/square_connect.gemspec +22 -11
  221. data/travis-ci/accounts.enc +0 -0
  222. metadata +264 -31
@@ -0,0 +1,56 @@
1
+ # SquareConnect::LocationApi
2
+
3
+ All URIs are relative to *https://connect.squareup.com*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**list_locations**](LocationApi.md#list_locations) | **GET** /v2/locations | ListLocations
8
+
9
+
10
+ # **list_locations**
11
+ > ListLocationsResponse list_locations(authorization)
12
+
13
+ ListLocations
14
+
15
+ Provides the details for all of a business's locations. Most other Connect API endpoints have a required `location_id` path parameter. The `id` field of the [`Location`](#type-location) objects returned by this endpoint correspond to that `location_id` parameter.
16
+
17
+ ### Example
18
+ ```ruby
19
+ # load the gem
20
+ require 'square_connect'
21
+
22
+ api_instance = SquareConnect::LocationApi.new
23
+
24
+ authorization = "authorization_example" # String | The value to provide in the Authorization header of your request. This value should follow the format `Bearer YOUR_ACCESS_TOKEN_HERE`.
25
+
26
+
27
+ begin
28
+ #ListLocations
29
+ result = api_instance.list_locations(authorization)
30
+ p result
31
+ rescue SquareConnect::ApiError => e
32
+ puts "Exception when calling LocationApi->list_locations: #{e}"
33
+ end
34
+ ```
35
+
36
+ ### Parameters
37
+
38
+ Name | Type | Description | Notes
39
+ ------------- | ------------- | ------------- | -------------
40
+ **authorization** | **String**| The value to provide in the Authorization header of your request. This value should follow the format `Bearer YOUR_ACCESS_TOKEN_HERE`. |
41
+
42
+ ### Return type
43
+
44
+ [**ListLocationsResponse**](ListLocationsResponse.md)
45
+
46
+ ### Authorization
47
+
48
+ No authorization required
49
+
50
+ ### HTTP request headers
51
+
52
+ - **Content-Type**: application/json
53
+ - **Accept**: application/json
54
+
55
+
56
+
@@ -0,0 +1,12 @@
1
+ # SquareConnect::LocationCapability
2
+
3
+ ### Description
4
+
5
+ Indicates account capabilities that a business's location might or might not have enabled.
6
+
7
+ ## Properties
8
+ Name | Type
9
+ ------------ | -------------
10
+ **CREDIT_CARD_PROCESSING** | string
11
+
12
+
@@ -0,0 +1,13 @@
1
+ # SquareConnect::Money
2
+
3
+ ### Description
4
+
5
+ Represents an amount of money. __Important:__ Unlike version 1 of the Connect API, __all monetary amounts returned by v2 endpoints are positive.__ (In v1, monetary amounts are negative if they represent money being paid _by_ a merchant, instead of money being paid _to_ a merchant.)
6
+
7
+ ## Properties
8
+ Name | Type | Description | Notes
9
+ ------------ | ------------- | ------------- | -------------
10
+ **amount** | **Integer** | The amount of money, in the smallest denomination of the currency indicated by `currency`. For example, when `currency` is `USD`, `amount` is in cents. | [optional]
11
+ **currency** | **String** | The type of currency, in __ISO 4217 format__. For example, the currency code for US dollars is `USD`. See [Currency](#type-currency) for possible values. | [optional]
12
+
13
+
@@ -0,0 +1,16 @@
1
+ # SquareConnect::Order
2
+
3
+ ### Description
4
+
5
+ Contains all information related to a single order to process with Square, including line items that specify the products to purchase
6
+
7
+ ## Properties
8
+ Name | Type | Description | Notes
9
+ ------------ | ------------- | ------------- | -------------
10
+ **id** | **String** | The order's unique ID. This value is not present if the order was not created with the [CreateOrder](#endpoint-createorder) endpoint. | [optional]
11
+ **location_id** | **String** | The ID of the merchant location this order is associated with. | [optional]
12
+ **reference_id** | **String** | A client specified identifier to associate an entity in another system with this order. | [optional]
13
+ **line_items** | [**Array<OrderLineItem>**](OrderLineItem.md) | The line items included in the order. Every order has at least one line item. | [optional]
14
+ **total_money** | [**Money**](Money.md) | The total amount of money to collect for the order. | [optional]
15
+
16
+
@@ -0,0 +1,16 @@
1
+ # SquareConnect::OrderLineItem
2
+
3
+ ### Description
4
+
5
+ Represents a line item in an order. Each line item describes a different product to purchase, with its own quantity and price details.
6
+
7
+ ## Properties
8
+ Name | Type | Description | Notes
9
+ ------------ | ------------- | ------------- | -------------
10
+ **id** | **String** | The line item's ID, unique only within this order. | [optional]
11
+ **name** | **String** | The name of the line item. | [optional]
12
+ **quantity** | **String** | The quantity of the product to purchase. Currently, this string must have an integer value. | [optional]
13
+ **base_price_money** | [**Money**](Money.md) | The base price for a single unit of the line item's associated variation. If a line item represents a Custom Amount instead of a particular product, this field indicates that amount. | [optional]
14
+ **total_money** | [**Money**](Money.md) | The total amount of money to collect for this line item. | [optional]
15
+
16
+
@@ -0,0 +1,20 @@
1
+ # SquareConnect::Refund
2
+
3
+ ### Description
4
+
5
+ Represents a refund processed for a Square transaction.
6
+
7
+ ## Properties
8
+ Name | Type | Description | Notes
9
+ ------------ | ------------- | ------------- | -------------
10
+ **id** | **String** | The refund's unique ID. |
11
+ **location_id** | **String** | The ID of the refund's associated location. |
12
+ **transaction_id** | **String** | The ID of the transaction that the refunded tender is part of. |
13
+ **tender_id** | **String** | The ID of the refunded tender. |
14
+ **created_at** | **String** | The time when the refund was created, in RFC 3339 format. | [optional]
15
+ **reason** | **String** | The reason for the refund being issued. |
16
+ **amount_money** | [**Money**](Money.md) | The amount of money refunded to the buyer. |
17
+ **status** | **String** | The current status of the refund (`PENDING`, `APPROVED`, `REJECTED`, or `FAILED`). |
18
+ **processing_fee_money** | [**Money**](Money.md) | The amount of Square processing fee money refunded to the *merchant*. | [optional]
19
+
20
+
@@ -0,0 +1,126 @@
1
+ # SquareConnect::RefundApi
2
+
3
+ All URIs are relative to *https://connect.squareup.com*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**create_refund**](RefundApi.md#create_refund) | **POST** /v2/locations/{location_id}/transactions/{transaction_id}/refund | CreateRefund
8
+ [**list_refunds**](RefundApi.md#list_refunds) | **GET** /v2/locations/{location_id}/refunds | ListRefunds
9
+
10
+
11
+ # **create_refund**
12
+ > CreateRefundResponse create_refund(authorization, location_id, transaction_id, body)
13
+
14
+ CreateRefund
15
+
16
+ Initiates a refund for a previously charged tender.
17
+
18
+ ### Example
19
+ ```ruby
20
+ # load the gem
21
+ require 'square_connect'
22
+
23
+ api_instance = SquareConnect::RefundApi.new
24
+
25
+ authorization = "authorization_example" # String | The value to provide in the Authorization header of your request. This value should follow the format `Bearer YOUR_ACCESS_TOKEN_HERE`.
26
+
27
+ location_id = "location_id_example" # String | The ID of the original transaction's associated location.
28
+
29
+ transaction_id = "transaction_id_example" # String | The ID of the original transaction that includes the tender to refund.
30
+
31
+ body = SquareConnect::CreateRefundRequest.new # CreateRefundRequest | An object containing the fields to POST for the request. See the corresponding object definition for field details.
32
+
33
+
34
+ begin
35
+ #CreateRefund
36
+ result = api_instance.create_refund(authorization, location_id, transaction_id, body)
37
+ p result
38
+ rescue SquareConnect::ApiError => e
39
+ puts "Exception when calling RefundApi->create_refund: #{e}"
40
+ end
41
+ ```
42
+
43
+ ### Parameters
44
+
45
+ Name | Type | Description | Notes
46
+ ------------- | ------------- | ------------- | -------------
47
+ **authorization** | **String**| The value to provide in the Authorization header of your request. This value should follow the format `Bearer YOUR_ACCESS_TOKEN_HERE`. |
48
+ **location_id** | **String**| The ID of the original transaction's associated location. |
49
+ **transaction_id** | **String**| The ID of the original transaction that includes the tender to refund. |
50
+ **body** | [**CreateRefundRequest**](CreateRefundRequest.md)| An object containing the fields to POST for the request. See the corresponding object definition for field details. |
51
+
52
+ ### Return type
53
+
54
+ [**CreateRefundResponse**](CreateRefundResponse.md)
55
+
56
+ ### Authorization
57
+
58
+ No authorization required
59
+
60
+ ### HTTP request headers
61
+
62
+ - **Content-Type**: application/json
63
+ - **Accept**: application/json
64
+
65
+
66
+
67
+ # **list_refunds**
68
+ > ListRefundsResponse list_refunds(authorization, location_id, opts)
69
+
70
+ ListRefunds
71
+
72
+ Lists refunds for one of a business's locations. Refunds with a `status` of `PENDING` are not currently included in this endpoint's response. Max results per [page](#paginatingresults): 50
73
+
74
+ ### Example
75
+ ```ruby
76
+ # load the gem
77
+ require 'square_connect'
78
+
79
+ api_instance = SquareConnect::RefundApi.new
80
+
81
+ authorization = "authorization_example" # String | The value to provide in the Authorization header of your request. This value should follow the format `Bearer YOUR_ACCESS_TOKEN_HERE`.
82
+
83
+ location_id = "location_id_example" # String | The ID of the location to list refunds for.
84
+
85
+ opts = {
86
+ begin_time: "begin_time_example", # String | The beginning of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time minus one year.
87
+ end_time: "end_time_example", # String | The end of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time.
88
+ sort_order: "sort_order_example", # String | The order in which results are listed in the response (`ASC` for oldest first, `DESC` for newest first). Default value: `DESC`
89
+ cursor: "cursor_example" # String | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See [Paginating results](#paginatingresults) for more information.
90
+ }
91
+
92
+ begin
93
+ #ListRefunds
94
+ result = api_instance.list_refunds(authorization, location_id, opts)
95
+ p result
96
+ rescue SquareConnect::ApiError => e
97
+ puts "Exception when calling RefundApi->list_refunds: #{e}"
98
+ end
99
+ ```
100
+
101
+ ### Parameters
102
+
103
+ Name | Type | Description | Notes
104
+ ------------- | ------------- | ------------- | -------------
105
+ **authorization** | **String**| The value to provide in the Authorization header of your request. This value should follow the format `Bearer YOUR_ACCESS_TOKEN_HERE`. |
106
+ **location_id** | **String**| The ID of the location to list refunds for. |
107
+ **begin_time** | **String**| The beginning of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time minus one year. | [optional]
108
+ **end_time** | **String**| The end of the requested reporting period, in RFC 3339 format. See [Date ranges](#dateranges) for details on date inclusivity/exclusivity. Default value: The current time. | [optional]
109
+ **sort_order** | **String**| The order in which results are listed in the response (`ASC` for oldest first, `DESC` for newest first). Default value: `DESC` | [optional]
110
+ **cursor** | **String**| A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See [Paginating results](#paginatingresults) for more information. | [optional]
111
+
112
+ ### Return type
113
+
114
+ [**ListRefundsResponse**](ListRefundsResponse.md)
115
+
116
+ ### Authorization
117
+
118
+ No authorization required
119
+
120
+ ### HTTP request headers
121
+
122
+ - **Content-Type**: application/json
123
+ - **Accept**: application/json
124
+
125
+
126
+
@@ -0,0 +1,15 @@
1
+ # SquareConnect::RefundStatus
2
+
3
+ ### Description
4
+
5
+ Indicates a refund's current status.
6
+
7
+ ## Properties
8
+ Name | Type
9
+ ------------ | -------------
10
+ **PENDING** | string
11
+ **APPROVED** | string
12
+ **REJECTED** | string
13
+ **FAILED** | string
14
+
15
+
@@ -0,0 +1,11 @@
1
+ # SquareConnect::RetrieveCustomerRequest
2
+
3
+ ### Description
4
+
5
+
6
+
7
+ ## Properties
8
+ Name | Type | Description | Notes
9
+ ------------ | ------------- | ------------- | -------------
10
+
11
+
@@ -0,0 +1,13 @@
1
+ # SquareConnect::RetrieveCustomerResponse
2
+
3
+ ### Description
4
+
5
+ Defines the fields that are included in the response body of a request to the [RetrieveCustomer](#endpoint-retrievecustomer) endpoint. One of `errors` or `customer` is present in a given response (never both).
6
+
7
+ ## Properties
8
+ Name | Type | Description | Notes
9
+ ------------ | ------------- | ------------- | -------------
10
+ **errors** | [**Array<Error>**](Error.md) | Any errors that occurred during the request. | [optional]
11
+ **customer** | [**Customer**](Customer.md) | The requested customer. | [optional]
12
+
13
+
@@ -0,0 +1,11 @@
1
+ # SquareConnect::RetrieveTransactionRequest
2
+
3
+ ### Description
4
+
5
+
6
+
7
+ ## Properties
8
+ Name | Type | Description | Notes
9
+ ------------ | ------------- | ------------- | -------------
10
+
11
+
@@ -0,0 +1,13 @@
1
+ # SquareConnect::RetrieveTransactionResponse
2
+
3
+ ### Description
4
+
5
+ Defines the fields that are included in the response body of a request to the [RetrieveTransaction](#endpont-retrievetransaction) endpoint. One of `errors` or `transaction` is present in a given response (never both).
6
+
7
+ ## Properties
8
+ Name | Type | Description | Notes
9
+ ------------ | ------------- | ------------- | -------------
10
+ **errors** | [**Array<Error>**](Error.md) | Any errors that occurred during the request. | [optional]
11
+ **transaction** | [**Transaction**](Transaction.md) | The requested transaction. | [optional]
12
+
13
+
@@ -0,0 +1,13 @@
1
+ # SquareConnect::SortOrder
2
+
3
+ ### Description
4
+
5
+ The order (e.g., chronological or alphabetical) in which results from a request are returned.
6
+
7
+ ## Properties
8
+ Name | Type
9
+ ------------ | -------------
10
+ **DESC** | string
11
+ **ASC** | string
12
+
13
+
@@ -0,0 +1,22 @@
1
+ # SquareConnect::Tender
2
+
3
+ ### Description
4
+
5
+ Represents a tender (i.e., a method of payment) used in a Square transaction.
6
+
7
+ ## Properties
8
+ Name | Type | Description | Notes
9
+ ------------ | ------------- | ------------- | -------------
10
+ **id** | **String** | The tender's unique ID. | [optional]
11
+ **location_id** | **String** | The ID of the transaction's associated location. | [optional]
12
+ **transaction_id** | **String** | The ID of the tender's associated transaction. | [optional]
13
+ **created_at** | **String** | The time when the tender was created, in RFC 3339 format. | [optional]
14
+ **note** | **String** | An optional note associated with the tender at the time of payment. | [optional]
15
+ **amount_money** | [**Money**](Money.md) | The amount of the tender. | [optional]
16
+ **processing_fee_money** | [**Money**](Money.md) | The amount of any Square processing fees applied to the tender. This field is not immediately populated when a new transaction is created. It is usually available after about ten seconds. | [optional]
17
+ **customer_id** | **String** | If the tender is associated with a customer or represents a customer's card on file, this is the ID of the associated customer. | [optional]
18
+ **type** | **String** | The type of tender, such as `CARD` or `CASH`. |
19
+ **card_details** | [**TenderCardDetails**](TenderCardDetails.md) | The details of the card tender. This value is present only if the value of `type` is `CARD`. | [optional]
20
+ **cash_details** | [**TenderCashDetails**](TenderCashDetails.md) | The details of the cash tender. This value is present only if the value of `type` is `CASH`. | [optional]
21
+
22
+
@@ -0,0 +1,14 @@
1
+ # SquareConnect::TenderCardDetails
2
+
3
+ ### Description
4
+
5
+ Represents additional details of a tender with `type` `CARD` or `SQUARE_GIFT_CARD`
6
+
7
+ ## Properties
8
+ Name | Type | Description | Notes
9
+ ------------ | ------------- | ------------- | -------------
10
+ **status** | **String** | The credit card payment's current state (such as `AUTHORIZED` or `CAPTURED`). See [TenderCardDetailsStatus](#type-tendercarddetailsstatus) for possible values. | [optional]
11
+ **card** | [**Card**](Card.md) | The credit card's non-confidential details. | [optional]
12
+ **entry_method** | **String** | The method used to enter the card's details for the transaction. | [optional]
13
+
14
+
@@ -0,0 +1,16 @@
1
+ # SquareConnect::TenderCardDetailsEntryMethod
2
+
3
+ ### Description
4
+
5
+ Indicates the method used to enter the card's details.
6
+
7
+ ## Properties
8
+ Name | Type
9
+ ------------ | -------------
10
+ **SWIPED** | string
11
+ **KEYED** | string
12
+ **EMV** | string
13
+ **ON_FILE** | string
14
+ **CONTACTLESS** | string
15
+
16
+
@@ -0,0 +1,15 @@
1
+ # SquareConnect::TenderCardDetailsStatus
2
+
3
+ ### Description
4
+
5
+ Indicates the card transaction's current status.
6
+
7
+ ## Properties
8
+ Name | Type
9
+ ------------ | -------------
10
+ **AUTHORIZED** | string
11
+ **CAPTURED** | string
12
+ **VOIDED** | string
13
+ **FAILED** | string
14
+
15
+
@@ -0,0 +1,13 @@
1
+ # SquareConnect::TenderCashDetails
2
+
3
+ ### Description
4
+
5
+ Represents the details of a tender with `type` `CASH`.
6
+
7
+ ## Properties
8
+ Name | Type | Description | Notes
9
+ ------------ | ------------- | ------------- | -------------
10
+ **buyer_tendered_money** | [**Money**](Money.md) | The total amount of cash provided by the buyer, before change is given. | [optional]
11
+ **change_back_money** | [**Money**](Money.md) | The amount of change returned to the buyer. | [optional]
12
+
13
+
@@ -0,0 +1,17 @@
1
+ # SquareConnect::TenderType
2
+
3
+ ### Description
4
+
5
+ Indicates a tender's type.
6
+
7
+ ## Properties
8
+ Name | Type
9
+ ------------ | -------------
10
+ **CARD** | string
11
+ **CASH** | string
12
+ **THIRD_PARTY_CARD** | string
13
+ **SQUARE_GIFT_CARD** | string
14
+ **NO_SALE** | string
15
+ **OTHER** | string
16
+
17
+