digital_femsa 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) hide show
  1. checksums.yaml +4 -4
  2. data/Makefile +14 -0
  3. data/README.md +28 -33
  4. data/VERSION +1 -1
  5. data/config-ruby.json +1 -1
  6. data/docs/ApiKeyCreateResponse.md +1 -1
  7. data/docs/ApiKeyRequest.md +2 -2
  8. data/docs/ApiKeyResponseOnDelete.md +2 -2
  9. data/docs/ApiKeysApi.md +10 -10
  10. data/docs/BalanceResponse.md +8 -8
  11. data/docs/BalancesApi.md +1 -1
  12. data/docs/ChargeOrderResponse.md +1 -1
  13. data/docs/ChargeOrderResponseChannel.md +24 -0
  14. data/docs/ChargeRequest.md +1 -1
  15. data/docs/ChargeRequestPaymentMethod.md +3 -3
  16. data/docs/ChargeResponse.md +9 -7
  17. data/docs/ChargeResponseChannel.md +3 -3
  18. data/docs/ChargeResponseRefundsData.md +5 -1
  19. data/docs/ChargesApi.md +16 -12
  20. data/docs/ChargesDataResponse.md +9 -7
  21. data/docs/Checkout.md +17 -15
  22. data/docs/CheckoutOrderTemplate.md +3 -3
  23. data/docs/CheckoutResponse.md +1 -1
  24. data/docs/CreateCustomerFiscalEntitiesResponse.md +2 -2
  25. data/docs/Customer.md +13 -19
  26. data/docs/CustomerAddress.md +2 -2
  27. data/docs/CustomerFiscalEntitiesDataResponse.md +2 -2
  28. data/docs/CustomerFiscalEntitiesRequest.md +3 -3
  29. data/docs/CustomerInfo.md +4 -4
  30. data/docs/CustomerPaymentMethodRequest.md +1 -1
  31. data/docs/CustomerResponse.md +17 -21
  32. data/docs/CustomerShippingContactsResponse.md +5 -5
  33. data/docs/CustomersApi.md +15 -15
  34. data/docs/CustomersResponse.md +1 -1
  35. data/docs/DeleteApiKeysResponse.md +1 -1
  36. data/docs/DiscountsApi.md +9 -9
  37. data/docs/EventsApi.md +2 -2
  38. data/docs/EventsResendResponse.md +1 -1
  39. data/docs/GetChargesResponse.md +4 -4
  40. data/docs/GetTransactionsResponse.md +1 -1
  41. data/docs/LogsApi.md +1 -1
  42. data/docs/OrderFiscalEntityRequest.md +4 -4
  43. data/docs/OrderRefundRequest.md +7 -5
  44. data/docs/OrderRequest.md +17 -19
  45. data/docs/OrderResponse.md +37 -35
  46. data/docs/OrderResponseChannel.md +24 -0
  47. data/docs/OrderResponseShippingContact.md +4 -4
  48. data/docs/OrderUpdateFiscalEntityRequest.md +1 -1
  49. data/docs/OrderUpdateRequest.md +19 -15
  50. data/docs/OrdersApi.md +16 -16
  51. data/docs/PaymentLinkApi.md +12 -82
  52. data/docs/PaymentMethodCash.md +4 -4
  53. data/docs/PaymentMethodCashRequest.md +2 -2
  54. data/docs/PaymentMethodsApi.md +5 -5
  55. data/docs/Product.md +10 -12
  56. data/docs/ProductDataResponse.md +9 -11
  57. data/docs/ProductOrderResponse.md +9 -11
  58. data/docs/ProductsApi.md +7 -7
  59. data/docs/ShippingContactsApi.md +9 -9
  60. data/docs/ShippingOrderResponse.md +5 -3
  61. data/docs/ShippingRequest.md +2 -0
  62. data/docs/ShippingsApi.md +7 -7
  63. data/docs/TaxesApi.md +7 -7
  64. data/docs/TransactionResponse.md +20 -14
  65. data/docs/TransactionsApi.md +6 -6
  66. data/docs/TransfersApi.md +10 -10
  67. data/docs/UpdateCustomer.md +17 -21
  68. data/docs/UpdateCustomerFiscalEntitiesResponse.md +2 -2
  69. data/docs/UpdateOrderTaxRequest.md +2 -2
  70. data/docs/UpdateProduct.md +7 -9
  71. data/docs/WebhookKeysApi.md +18 -14
  72. data/docs/WebhooksApi.md +28 -22
  73. data/lib/digital_femsa/api/api_keys_api.rb +8 -8
  74. data/lib/digital_femsa/api/balances_api.rb +2 -2
  75. data/lib/digital_femsa/api/charges_api.rb +13 -9
  76. data/lib/digital_femsa/api/customers_api.rb +12 -12
  77. data/lib/digital_femsa/api/discounts_api.rb +12 -12
  78. data/lib/digital_femsa/api/events_api.rb +4 -4
  79. data/lib/digital_femsa/api/logs_api.rb +2 -2
  80. data/lib/digital_femsa/api/orders_api.rb +20 -20
  81. data/lib/digital_femsa/api/payment_link_api.rb +10 -86
  82. data/lib/digital_femsa/api/payment_methods_api.rb +8 -8
  83. data/lib/digital_femsa/api/products_api.rb +10 -10
  84. data/lib/digital_femsa/api/shipping_contacts_api.rb +8 -8
  85. data/lib/digital_femsa/api/shippings_api.rb +10 -10
  86. data/lib/digital_femsa/api/taxes_api.rb +10 -10
  87. data/lib/digital_femsa/api/transactions_api.rb +6 -6
  88. data/lib/digital_femsa/api/transfers_api.rb +8 -8
  89. data/lib/digital_femsa/api/webhook_keys_api.rb +14 -10
  90. data/lib/digital_femsa/api/webhooks_api.rb +23 -16
  91. data/lib/digital_femsa/api_client.rb +9 -5
  92. data/lib/digital_femsa/models/api_key_create_response.rb +1 -1
  93. data/lib/digital_femsa/models/api_key_request.rb +36 -1
  94. data/lib/digital_femsa/models/balance_response.rb +9 -9
  95. data/lib/digital_femsa/models/charge_order_response.rb +1 -1
  96. data/lib/digital_femsa/models/{order_next_action_response.rb → charge_order_response_channel.rb} +34 -18
  97. data/lib/digital_femsa/models/charge_request_payment_method.rb +3 -2
  98. data/lib/digital_femsa/models/charge_response.rb +15 -4
  99. data/lib/digital_femsa/models/charge_response_refunds_data.rb +23 -4
  100. data/lib/digital_femsa/models/charge_update_request.rb +1 -1
  101. data/lib/digital_femsa/models/charges_data_response.rb +15 -4
  102. data/lib/digital_femsa/models/checkout.rb +97 -81
  103. data/lib/digital_femsa/models/checkout_order_template.rb +4 -4
  104. data/lib/digital_femsa/models/checkout_order_template_customer_info.rb +1 -1
  105. data/lib/digital_femsa/models/checkout_request.rb +1 -1
  106. data/lib/digital_femsa/models/checkout_response.rb +1 -1
  107. data/lib/digital_femsa/models/create_customer_fiscal_entities_response.rb +10 -10
  108. data/lib/digital_femsa/models/customer.rb +57 -95
  109. data/lib/digital_femsa/models/customer_address.rb +7 -0
  110. data/lib/digital_femsa/models/customer_fiscal_entities_data_response.rb +10 -10
  111. data/lib/digital_femsa/models/customer_fiscal_entities_request.rb +13 -13
  112. data/lib/digital_femsa/models/customer_info.rb +13 -20
  113. data/lib/digital_femsa/models/customer_payment_method_request.rb +2 -2
  114. data/lib/digital_femsa/models/customer_payment_sources_inner.rb +104 -0
  115. data/lib/digital_femsa/models/customer_response.rb +122 -113
  116. data/lib/digital_femsa/models/customer_shipping_contacts_response.rb +2 -0
  117. data/lib/digital_femsa/models/customers_response.rb +1 -0
  118. data/lib/digital_femsa/models/events_resend_response.rb +1 -1
  119. data/lib/digital_femsa/models/get_charges_response.rb +21 -21
  120. data/lib/digital_femsa/models/get_transactions_response.rb +1 -1
  121. data/lib/digital_femsa/models/log_response.rb +1 -1
  122. data/lib/digital_femsa/models/logs_response.rb +1 -1
  123. data/lib/digital_femsa/models/order_fiscal_entity_response.rb +1 -1
  124. data/lib/digital_femsa/models/order_refund_request.rb +59 -11
  125. data/lib/digital_femsa/models/order_request.rb +69 -79
  126. data/lib/digital_femsa/models/order_response.rb +187 -119
  127. data/lib/digital_femsa/models/{order_next_action_response_redirect_to_url.rb → order_response_channel.rb} +35 -19
  128. data/lib/digital_femsa/models/order_response_charges.rb +1 -1
  129. data/lib/digital_femsa/models/order_response_checkout.rb +1 -0
  130. data/lib/digital_femsa/models/order_response_customer_info.rb +1 -0
  131. data/lib/digital_femsa/models/order_response_shipping_contact.rb +3 -0
  132. data/lib/digital_femsa/models/order_update_fiscal_entity_request.rb +1 -1
  133. data/lib/digital_femsa/models/order_update_request.rb +106 -65
  134. data/lib/digital_femsa/models/payment_method_cash.rb +1 -1
  135. data/lib/digital_femsa/models/payment_method_cash_request.rb +2 -1
  136. data/lib/digital_femsa/models/product.rb +103 -95
  137. data/lib/digital_femsa/models/product_data_response.rb +103 -95
  138. data/lib/digital_femsa/models/product_order_response.rb +103 -95
  139. data/lib/digital_femsa/models/shipping_order_response.rb +11 -1
  140. data/lib/digital_femsa/models/shipping_request.rb +12 -1
  141. data/lib/digital_femsa/models/transaction_response.rb +172 -99
  142. data/lib/digital_femsa/models/transfers_response.rb +1 -1
  143. data/lib/digital_femsa/models/transfers_response_destination.rb +312 -0
  144. data/lib/digital_femsa/models/update_customer.rb +42 -85
  145. data/lib/digital_femsa/models/update_customer_fiscal_entities_response.rb +10 -10
  146. data/lib/digital_femsa/models/update_order_discount_lines_request.rb +34 -0
  147. data/lib/digital_femsa/models/update_order_tax_request.rb +2 -2
  148. data/lib/digital_femsa/models/update_payment_methods_amount.rb +105 -0
  149. data/lib/digital_femsa/models/update_payment_methods_expires_at.rb +105 -0
  150. data/lib/digital_femsa/models/update_product.rb +85 -58
  151. data/lib/digital_femsa/models/webhook_key_delete_response.rb +1 -1
  152. data/lib/digital_femsa/models/webhook_key_request.rb +1 -0
  153. data/lib/digital_femsa/models/webhook_key_response.rb +1 -1
  154. data/lib/digital_femsa/models/webhook_request.rb +1 -1
  155. data/lib/digital_femsa/models/webhook_response.rb +1 -1
  156. data/lib/digital_femsa/models/webhook_update_request.rb +1 -1
  157. data/lib/digital_femsa/version.rb +1 -1
  158. data/lib/digital_femsa.rb +2 -6
  159. data/templates/ruby/api_client.mustache +8 -4
  160. metadata +26 -26
  161. data/docs/CustomerAntifraudInfo.md +0 -20
  162. data/docs/CustomerAntifraudInfoResponse.md +0 -20
  163. data/docs/OrderNextActionResponse.md +0 -20
  164. data/docs/OrderNextActionResponseRedirectToUrl.md +0 -20
  165. data/docs/SmsCheckoutRequest.md +0 -18
  166. data/docs/UpdateCustomerAntifraudInfo.md +0 -20
@@ -4,10 +4,10 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **has_more** | **Boolean** | Indicates if there are more pages to be requested | |
8
- | **object** | **String** | Object type, in this case is list | |
9
7
  | **next_page_url** | **String** | URL of the next page. | [optional] |
10
8
  | **previous_page_url** | **String** | Url of the previous page. | [optional] |
9
+ | **has_more** | **Boolean** | Indicates if there are more pages to be requested | |
10
+ | **object** | **String** | Object type, in this case is list | |
11
11
  | **data** | [**Array<ChargeResponse>**](ChargeResponse.md) | | [optional] |
12
12
 
13
13
  ## Example
@@ -16,10 +16,10 @@
16
16
  require 'digital_femsa'
17
17
 
18
18
  instance = DigitalFemsa::GetChargesResponse.new(
19
- has_more: false,
20
- object: list,
21
19
  next_page_url: https://api.femsa.io/resources?limit=10&next=chrg_1,
22
20
  previous_page_url: https://api.femsa.io/resources?limit=10&previous=chrg_1,
21
+ has_more: false,
22
+ object: list,
23
23
  data: null
24
24
  )
25
25
  ```
@@ -8,7 +8,7 @@
8
8
  | **object** | **String** | Object type, in this case is list | |
9
9
  | **next_page_url** | **String** | URL of the next page. | [optional] |
10
10
  | **previous_page_url** | **String** | Url of the previous page. | [optional] |
11
- | **data** | [**Array<TransactionResponse>**](TransactionResponse.md) | Transactions | [optional] |
11
+ | **data** | [**Array<TransactionResponse>**](TransactionResponse.md) | Transactions (ledger movements) | [optional] |
12
12
 
13
13
  ## Example
14
14
 
data/docs/LogsApi.md CHANGED
@@ -89,7 +89,7 @@ end
89
89
 
90
90
  Get List Of Logs
91
91
 
92
- Get log details in the form of a list
92
+ Returns a paginated list of logs generated by the platform. Logs can be used for troubleshooting and auditing requests and internal operations. Use pagination parameters to navigate through results, and `search` to filter by supported criteria.
93
93
 
94
94
  ### Examples
95
95
 
@@ -18,11 +18,11 @@ require 'digital_femsa'
18
18
 
19
19
  instance = DigitalFemsa::OrderFiscalEntityRequest.new(
20
20
  address: null,
21
- email: test@gmail.com,
21
+ email: null,
22
22
  metadata: null,
23
- name: Femsa Inc,
24
- phone: +525511223344,
25
- tax_id: AAA010101AAA
23
+ name: null,
24
+ phone: null,
25
+ tax_id: null
26
26
  )
27
27
  ```
28
28
 
@@ -4,9 +4,10 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **amount** | **Integer** | | |
8
- | **expires_at** | **Integer** | | [optional] |
9
- | **reason** | **String** | | |
7
+ | **amount** | **Integer** | Amount to refund. If not provided, the API refunds the refundable amount of the selected charge. | |
8
+ | **charge_id** | **String** | Charge ID to refund. If not provided, the API selects a refundable charge from the order. | [optional] |
9
+ | **reason** | **String** | Refund reason. If not provided, the API uses a default reason. | |
10
+ | **expires_at** | **Integer** | Expiration timestamp for cash refunds (must be within the allowed range configured by the API). | [optional] |
10
11
 
11
12
  ## Example
12
13
 
@@ -15,8 +16,9 @@ require 'digital_femsa'
15
16
 
16
17
  instance = DigitalFemsa::OrderRefundRequest.new(
17
18
  amount: 500,
18
- expires_at: 1553273553,
19
- reason: suspected_fraud
19
+ charge_id: 6976b2e3c4418f00012943c5,
20
+ reason: suspected_fraud,
21
+ expires_at: 1553273553
20
22
  )
21
23
  ```
22
24
 
data/docs/OrderRequest.md CHANGED
@@ -4,20 +4,19 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **charges** | [**Array<ChargeRequest>**](ChargeRequest.md) | List of [charges](https://developers.femsa.com/v2.1.0/reference/orderscreatecharge) that are applied to the order | [optional] |
8
- | **checkout** | [**CheckoutRequest**](CheckoutRequest.md) | | [optional] |
9
- | **currency** | **String** | Currency with which the payment will be made. It uses the 3-letter code of the [International Standard ISO 4217.](https://es.wikipedia.org/wiki/ISO_4217) | |
7
+ | **currency** | **String** | Currency with which the payment will be made. | |
10
8
  | **customer_info** | [**OrderRequestCustomerInfo**](OrderRequestCustomerInfo.md) | | |
11
- | **discount_lines** | [**Array<OrderDiscountLinesRequest>**](OrderDiscountLinesRequest.md) | List of [discounts](https://developers.femsa.com/v2.1.0/reference/orderscreatediscountline) that are applied to the order. You must have at least one discount. | [optional] |
12
- | **fiscal_entity** | [**OrderFiscalEntityRequest**](OrderFiscalEntityRequest.md) | | [optional] |
13
- | **line_items** | [**Array<Product>**](Product.md) | List of [products](https://developers.femsa.com/v2.1.0/reference/orderscreateproduct) that are sold in the order. You must have at least one product. | |
14
- | **metadata** | **Hash<String, Object>** | Metadata associated with the order | [optional] |
9
+ | **line_items** | [**Array<Product>**](Product.md) | List of [products](https://developers.digitalfemsa.io/reference/orderscreateproduct) that are sold in the order. You must have at least one product. | |
10
+ | **charges** | [**Array<ChargeRequest>**](ChargeRequest.md) | List of [charges](https://developers.digitalfemsa.io/reference/orderscreatecharge) that are applied to the order | [optional] |
11
+ | **checkout** | [**CheckoutRequest**](CheckoutRequest.md) | | [optional] |
12
+ | **discount_lines** | [**Array<OrderDiscountLinesRequest>**](OrderDiscountLinesRequest.md) | List of [discounts](https://developers.digitalfemsa.io/reference/orderscreatediscountline) that are applied to the order. You must have at least one discount. | [optional] |
13
+ | **tax_lines** | [**Array<OrderTaxRequest>**](OrderTaxRequest.md) | List of [taxes](https://developers.digitalfemsa.io/reference/orderscreatetaxes) that are applied to the order. | [optional] |
15
14
  | **needs_shipping_contact** | **Boolean** | Allows you to fill out the shipping information at checkout | [optional] |
16
- | **processing_mode** | **String** | Indicates the processing mode for the order, either ecommerce, recurrent or validation. | [optional] |
17
- | **return_url** | **String** | Indicates the redirection callback upon completion of the 3DS2 flow. | [optional] |
18
15
  | **shipping_contact** | [**CustomerShippingContacts**](CustomerShippingContacts.md) | | [optional] |
19
- | **shipping_lines** | [**Array<ShippingRequest>**](ShippingRequest.md) | List of [shipping costs](https://developers.femsa.com/v2.1.0/reference/orderscreateshipping). If the online store offers digital products. | [optional] |
20
- | **tax_lines** | [**Array<OrderTaxRequest>**](OrderTaxRequest.md) | List of [taxes](https://developers.femsa.com/v2.1.0/reference/orderscreatetaxes) that are applied to the order. | [optional] |
16
+ | **shipping_lines** | [**Array<ShippingRequest>**](ShippingRequest.md) | List of [shipping costs](https://developers.digitalfemsa.io/reference/orderscreateshipping). If the online store offers digital products. | [optional] |
17
+ | **fiscal_entity** | [**OrderFiscalEntityRequest**](OrderFiscalEntityRequest.md) | | [optional] |
18
+ | **processing_mode** | **String** | Indicates the processing mode for the order, either ecommerce, recurrent or validation. | [optional] |
19
+ | **metadata** | **Hash<String, Object>** | Arbitrary key-value data that you can attach to the order for your internal use (e.g. `customer_segment`, `sales_channel`, `internal_order_id`). It is not used for payment processing or fraud decisions. Keys should be strings; values can be any JSON value. | [optional] |
21
20
 
22
21
  ## Example
23
22
 
@@ -25,20 +24,19 @@
25
24
  require 'digital_femsa'
26
25
 
27
26
  instance = DigitalFemsa::OrderRequest.new(
28
- charges: null,
29
- checkout: null,
30
27
  currency: MXN,
31
28
  customer_info: null,
32
- discount_lines: null,
33
- fiscal_entity: null,
34
29
  line_items: null,
35
- metadata: null,
30
+ charges: null,
31
+ checkout: null,
32
+ discount_lines: null,
33
+ tax_lines: null,
36
34
  needs_shipping_contact: false,
37
- processing_mode: ecommerce,
38
- return_url: https://my-website.com,
39
35
  shipping_contact: null,
40
36
  shipping_lines: null,
41
- tax_lines: null
37
+ fiscal_entity: null,
38
+ processing_mode: ecommerce,
39
+ metadata: null
42
40
  )
43
41
  ```
44
42
 
@@ -4,27 +4,28 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **amount** | **Integer** | The total amount to be collected in cents | [optional] |
8
- | **amount_refunded** | **Integer** | The total amount refunded in cents | [optional] |
9
- | **channel** | [**ChargeResponseChannel**](ChargeResponseChannel.md) | | [optional] |
10
- | **charges** | [**OrderResponseCharges**](OrderResponseCharges.md) | | [optional] |
11
- | **checkout** | [**OrderResponseCheckout**](OrderResponseCheckout.md) | | [optional] |
12
- | **created_at** | **Integer** | The time at which the object was created in seconds since the Unix epoch | [optional] |
13
- | **currency** | **String** | The three-letter ISO 4217 currency code. The currency of the order. | [optional] |
7
+ | **id** | **String** | | [optional] |
8
+ | **object** | **String** | | [optional] |
9
+ | **livemode** | **Boolean** | | [optional] |
10
+ | **amount** | **Integer** | | [optional] |
11
+ | **currency** | **String** | | [optional] |
12
+ | **payment_status** | **String** | Current payment status of the order. It can be `null` for orders without payment information yet. | [optional] |
13
+ | **amount_refunded** | **Integer** | | [optional] |
14
+ | **split_payment** | **Boolean** | Indicates whether the order uses split payments (when available/configured). | [optional] |
15
+ | **metadata** | **Hash<String, Object>** | Metadata attached to the order. | [optional] |
16
+ | **is_refundable** | **Boolean** | Indicates whether the order is currently refundable. | [optional] |
17
+ | **created_at** | **Integer** | | [optional] |
18
+ | **updated_at** | **Integer** | | [optional] |
14
19
  | **customer_info** | [**OrderResponseCustomerInfo**](OrderResponseCustomerInfo.md) | | [optional] |
15
- | **discount_lines** | [**OrderResponseDiscountLines**](OrderResponseDiscountLines.md) | | [optional] |
20
+ | **shipping_contact** | [**OrderResponseShippingContact**](OrderResponseShippingContact.md) | | [optional] |
21
+ | **channel** | [**OrderResponseChannel**](OrderResponseChannel.md) | | [optional] |
16
22
  | **fiscal_entity** | [**OrderFiscalEntityResponse**](OrderFiscalEntityResponse.md) | | [optional] |
17
- | **id** | **String** | | [optional] |
18
- | **is_refundable** | **Boolean** | | [optional] |
23
+ | **checkout** | [**OrderResponseCheckout**](OrderResponseCheckout.md) | | [optional] |
19
24
  | **line_items** | [**OrderResponseProducts**](OrderResponseProducts.md) | | [optional] |
20
- | **livemode** | **Boolean** | Whether the object exists in live mode or test mode | [optional] |
21
- | **metadata** | **Hash<String, Object>** | Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. | [optional] |
22
- | **next_action** | [**OrderNextActionResponse**](OrderNextActionResponse.md) | | [optional] |
23
- | **object** | **String** | String representing the object’s type. Objects of the same type share the same value. | [optional] |
24
- | **payment_status** | **String** | The payment status of the order. | [optional] |
25
- | **processing_mode** | **String** | Indicates the processing mode for the order, either ecommerce, recurrent or validation. | [optional] |
26
- | **shipping_contact** | [**OrderResponseShippingContact**](OrderResponseShippingContact.md) | | [optional] |
27
- | **updated_at** | **Integer** | The time at which the object was last updated in seconds since the Unix epoch | [optional] |
25
+ | **discount_lines** | [**OrderResponseDiscountLines**](OrderResponseDiscountLines.md) | | [optional] |
26
+ | **charges** | [**OrderResponseCharges**](OrderResponseCharges.md) | | [optional] |
27
+ | **partial_reference** | **Hash<String, Object>** | Partial reference information (when applicable). Structure may vary depending on the payment flow. | [optional] |
28
+ | **payments_info** | **Hash<String, Object>** | Additional payment information (when available). Structure may vary. | [optional] |
28
29
 
29
30
  ## Example
30
31
 
@@ -32,27 +33,28 @@
32
33
  require 'digital_femsa'
33
34
 
34
35
  instance = DigitalFemsa::OrderResponse.new(
35
- amount: 21605,
36
- amount_refunded: 0,
37
- channel: null,
38
- charges: null,
39
- checkout: null,
40
- created_at: 1676328434,
36
+ id: ord_2zKSF2aUY2kBRcyXJ,
37
+ object: order,
38
+ livemode: true,
39
+ amount: 10000,
41
40
  currency: MXN,
41
+ payment_status: pending_payment,
42
+ amount_refunded: 0,
43
+ split_payment: null,
44
+ metadata: {},
45
+ is_refundable: false,
46
+ created_at: 1767651766,
47
+ updated_at: 1767651766,
42
48
  customer_info: null,
43
- discount_lines: null,
49
+ shipping_contact: null,
50
+ channel: null,
44
51
  fiscal_entity: null,
45
- id: ord_2tMtQQpDvfnNjiuFG,
46
- is_refundable: false,
52
+ checkout: null,
47
53
  line_items: null,
48
- livemode: false,
49
- metadata: null,
50
- next_action: null,
51
- object: order,
52
- payment_status: paid,
53
- processing_mode: ecommerce,
54
- shipping_contact: null,
55
- updated_at: 1676328434
54
+ discount_lines: null,
55
+ charges: null,
56
+ partial_reference: null,
57
+ payments_info: null
56
58
  )
57
59
  ```
58
60
 
@@ -0,0 +1,24 @@
1
+ # DigitalFemsa::OrderResponseChannel
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **segment** | **String** | | [optional] |
8
+ | **checkout_request_id** | **String** | | [optional] |
9
+ | **checkout_request_type** | **String** | | [optional] |
10
+ | **id** | **String** | | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'digital_femsa'
16
+
17
+ instance = DigitalFemsa::OrderResponseChannel.new(
18
+ segment: Checkout,
19
+ checkout_request_id: 6fca054a-8519-4c43-971e-cea35cc519bb,
20
+ checkout_request_type: HostedPayment,
21
+ id: channel_2tNDzhA4Akmzj11AU
22
+ )
23
+ ```
24
+
@@ -8,13 +8,13 @@
8
8
  | **receiver** | **String** | | [optional] |
9
9
  | **between_streets** | **String** | | [optional] |
10
10
  | **address** | [**CustomerShippingContactsResponseAddress**](CustomerShippingContactsResponseAddress.md) | | [optional] |
11
- | **parent_id** | **String** | | [optional] |
11
+ | **parent_id** | **String** | Customer ID that owns this shipping contact. | [optional] |
12
12
  | **default** | **Boolean** | | [optional] |
13
13
  | **id** | **String** | | [optional] |
14
14
  | **created_at** | **Integer** | | [optional] |
15
15
  | **metadata** | **Hash<String, Object>** | Metadata associated with the shipping contact | [optional] |
16
16
  | **object** | **String** | | [optional] |
17
- | **deleted** | **Boolean** | | [optional] |
17
+ | **deleted** | **Boolean** | Present only when the shipping contact was deleted. | [optional] |
18
18
 
19
19
  ## Example
20
20
 
@@ -26,13 +26,13 @@ instance = DigitalFemsa::OrderResponseShippingContact.new(
26
26
  receiver: Marvin Fuller,
27
27
  between_streets: Ackerman Crescent,
28
28
  address: null,
29
- parent_id: null,
29
+ parent_id: cus_1234567890,
30
30
  default: false,
31
31
  id: null,
32
32
  created_at: null,
33
33
  metadata: null,
34
34
  object: null,
35
- deleted: false
35
+ deleted: true
36
36
  )
37
37
  ```
38
38
 
@@ -7,7 +7,7 @@
7
7
  | **address** | [**FiscalEntityAddress**](FiscalEntityAddress.md) | | |
8
8
  | **email** | **String** | Email of the fiscal entity | [optional] |
9
9
  | **name** | **String** | Name of the fiscal entity | [optional] |
10
- | **metadata** | **Hash<String, Object>** | Metadata associated with the fiscal entity | [optional] |
10
+ | **metadata** | **Hash<String, Object>** | Arbitrary key-value data associated with the fiscal entity for your internal use. Keys should be strings; values can be any JSON value. | [optional] |
11
11
  | **phone** | **String** | Phone of the fiscal entity | [optional] |
12
12
  | **tax_id** | **String** | Tax ID of the fiscal entity | [optional] |
13
13
 
@@ -4,18 +4,20 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **charges** | [**Array<ChargeRequest>**](ChargeRequest.md) | | [optional] |
8
- | **checkout** | [**CheckoutRequest**](CheckoutRequest.md) | | [optional] |
9
- | **currency** | **String** | Currency with which the payment will be made. It uses the 3-letter code of the [International Standard ISO 4217.](https://es.wikipedia.org/wiki/ISO_4217) | [optional] |
7
+ | **currency** | **String** | Currency code in ISO 4217 (3-letter uppercase). | [optional] |
10
8
  | **customer_info** | [**OrderUpdateRequestCustomerInfo**](OrderUpdateRequestCustomerInfo.md) | | [optional] |
11
- | **discount_lines** | [**Array<OrderDiscountLinesRequest>**](OrderDiscountLinesRequest.md) | List of [discounts](https://developers.femsa.com/v2.1.0/reference/orderscreatediscountline) that are applied to the order. You must have at least one discount. | [optional] |
12
- | **fiscal_entity** | [**OrderUpdateFiscalEntityRequest**](OrderUpdateFiscalEntityRequest.md) | | [optional] |
13
9
  | **line_items** | [**Array<Product>**](Product.md) | List of [products](https://developers.femsa.com/v2.1.0/reference/orderscreateproduct) that are sold in the order. You must have at least one product. | [optional] |
14
- | **metadata** | **Hash<String, String>** | | [optional] |
15
- | **pre_authorize** | **Boolean** | Indicates whether the order charges must be preauthorized | [optional][default to false] |
10
+ | **charges** | [**Array<ChargeRequest>**](ChargeRequest.md) | | [optional] |
11
+ | **discount_lines** | [**Array<OrderDiscountLinesRequest>**](OrderDiscountLinesRequest.md) | List of [discounts](https://developers.femsa.com/v2.1.0/reference/orderscreatediscountline) that are applied to the order. You must have at least one discount. | [optional] |
12
+ | **tax_lines** | [**Array<OrderTaxRequest>**](OrderTaxRequest.md) | | [optional] |
13
+ | **shipping_contact_id** | **String** | Existing shipping contact id from the customer to link to this order. | [optional] |
16
14
  | **shipping_contact** | [**CustomerShippingContacts**](CustomerShippingContacts.md) | | [optional] |
17
15
  | **shipping_lines** | [**Array<ShippingRequest>**](ShippingRequest.md) | List of [shipping costs](https://developers.femsa.com/v2.1.0/reference/orderscreateshipping). If the online store offers digital products. | [optional] |
18
- | **tax_lines** | [**Array<OrderTaxRequest>**](OrderTaxRequest.md) | | [optional] |
16
+ | **fiscal_entity_id** | **String** | Existing fiscal entity id from the customer to link to this order. | [optional] |
17
+ | **fiscal_entity** | [**OrderUpdateFiscalEntityRequest**](OrderUpdateFiscalEntityRequest.md) | | [optional] |
18
+ | **return_url** | **String** | URL where the customer should be redirected after completing a payment flow (if applicable). | [optional] |
19
+ | **metadata** | **Hash<String, Object>** | Arbitrary key-value data that you can attach to the order for your internal use. It is not used for payment processing. Keys should be strings; values can be any JSON value. | [optional] |
20
+ | **status** | **String** | Order status update (only allowed transitions will be accepted). | [optional] |
19
21
 
20
22
  ## Example
21
23
 
@@ -23,18 +25,20 @@
23
25
  require 'digital_femsa'
24
26
 
25
27
  instance = DigitalFemsa::OrderUpdateRequest.new(
26
- charges: null,
27
- checkout: null,
28
28
  currency: MXN,
29
29
  customer_info: null,
30
- discount_lines: null,
31
- fiscal_entity: null,
32
30
  line_items: null,
33
- metadata: null,
34
- pre_authorize: null,
31
+ charges: null,
32
+ discount_lines: null,
33
+ tax_lines: null,
34
+ shipping_contact_id: null,
35
35
  shipping_contact: null,
36
36
  shipping_lines: null,
37
- tax_lines: null
37
+ fiscal_entity_id: null,
38
+ fiscal_entity: null,
39
+ return_url: null,
40
+ metadata: null,
41
+ status: null
38
42
  )
39
43
  ```
40
44
 
data/docs/OrdersApi.md CHANGED
@@ -11,7 +11,7 @@ All URIs are relative to *https://api.digitalfemsa.io*
11
11
  | [**order_cancel_refund**](OrdersApi.md#order_cancel_refund) | **DELETE** /orders/{id}/refunds/{refund_id} | Cancel Refund |
12
12
  | [**order_refund**](OrdersApi.md#order_refund) | **POST** /orders/{id}/refunds | Refund Order |
13
13
  | [**orders_create_capture**](OrdersApi.md#orders_create_capture) | **POST** /orders/{id}/capture | Capture Order |
14
- | [**update_order**](OrdersApi.md#update_order) | **PUT** /orders/{id} | Update Order |
14
+ | [**update_order**](OrdersApi.md#update_order) | **PUT** /orders/{id} | Update order |
15
15
 
16
16
 
17
17
  ## cancel_order
@@ -20,7 +20,7 @@ All URIs are relative to *https://api.digitalfemsa.io*
20
20
 
21
21
  Cancel Order
22
22
 
23
- Cancel an order that has been previously created.
23
+ Cancels an existing order. This operation marks the order as cancelled and prevents further processing depending on its current state. If the order cannot be cancelled (for example, due to its status or related charge constraints), the API returns an error response.
24
24
 
25
25
  ### Examples
26
26
 
@@ -95,7 +95,7 @@ end
95
95
 
96
96
  Create order
97
97
 
98
- Create a new order.
98
+ Creates a new order (products + amounts + customer data). Minimum required fields: - `currency` - `line_items` - `customer_info` About `customer_info`: - You can reference an existing customer using `customer_info.customer_id`, or - You can provide customer details at minimum `customer_info.name` and `customer_info.email` to create the order with customer context. How to create the order: - Create an order only (no payment): send only the order data. - Create an order and create the first payment charge: include `charges`. - Create an order with a checkout configuration (for a hosted payment flow): include `checkout`. Important rules: - You cannot send `charges` and `checkout` in the same request (they are mutually exclusive). - If you send `shipping_contact_id` and/or `fiscal_entity_id`, you must also send `customer_info.customer_id` so the API can validate those IDs against that customer.
99
99
 
100
100
  ### Examples
101
101
 
@@ -109,7 +109,7 @@ DigitalFemsa.configure do |config|
109
109
  end
110
110
 
111
111
  api_instance = DigitalFemsa::OrdersApi.new
112
- order_request = DigitalFemsa::OrderRequest.new({currency: 'MXN', customer_info: DigitalFemsa::CustomerInfo.new({name: 'DevTest', email: 'test@femsa.com', phone: '5522997233'}), line_items: [DigitalFemsa::Product.new({name: 'Box of Cohiba S1s', quantity: 1, unit_price: 20000})]}) # OrderRequest | requested field for order
112
+ order_request = DigitalFemsa::OrderRequest.new({currency: 'MXN', customer_info: DigitalFemsa::CustomerInfo.new({name: 'DevTest', email: 'test@femsa.com'}), line_items: [DigitalFemsa::Product.new({name: 'Box of Cohiba', unit_price: 20000, quantity: 1})]}) # OrderRequest | requested field for order
113
113
  opts = {
114
114
  accept_language: 'es', # String | Use for knowing which language to use
115
115
  x_child_company_id: '6441b6376b60c3a638da80af' # String | In the case of a holding company, the company id of the child company to which will process the request.
@@ -170,7 +170,7 @@ end
170
170
 
171
171
  Get Order
172
172
 
173
- Info for a specific order
173
+ Returns the full details of an Order by its ID. The response follows the standard Order representation, including nested previews (for example `charges`, `line_items`, `shipping_lines`, `tax_lines`, and `discount_lines`) when available.
174
174
 
175
175
  ### Examples
176
176
 
@@ -245,7 +245,7 @@ end
245
245
 
246
246
  Get a list of Orders
247
247
 
248
- Get order details in the form of a list
248
+ Returns a paginated list of orders created in your account. Use pagination parameters to navigate through results, and `search` to filter by supported criteria.
249
249
 
250
250
  ### Examples
251
251
 
@@ -326,7 +326,7 @@ end
326
326
 
327
327
  Cancel Refund
328
328
 
329
- A refunded order describes the items, amount, and reason an order is being refunded.
329
+ Cancels a refund previously created for an order. This operation is only available when the refund is still cancellable according to its current status and the payment method rules. If the refund cannot be cancelled, the API returns an error response.
330
330
 
331
331
  ### Examples
332
332
 
@@ -403,7 +403,7 @@ end
403
403
 
404
404
  Refund Order
405
405
 
406
- A refunded order describes the items, amount, and reason an order is being refunded.
406
+ Creates a refund for an order. This operation is used to refund a previously paid order (fully or partially, depending on the request body). The API will validate the order and its related charges before processing the refund. If the refund cannot be created due to business rules or state, an error response is returned.
407
407
 
408
408
  ### Examples
409
409
 
@@ -418,7 +418,7 @@ end
418
418
 
419
419
  api_instance = DigitalFemsa::OrdersApi.new
420
420
  id = '6307a60c41de27127515a575' # String | Identifier of the resource
421
- order_refund_request = DigitalFemsa::OrderRefundRequest.new({amount: 500, reason: 'suspected_fraud'}) # OrderRefundRequest | requested field for a refund
421
+ order_refund_request = DigitalFemsa::OrderRefundRequest.new({amount: 500, reason: 'requested_by_client'}) # OrderRefundRequest | requested field for a refund
422
422
  opts = {
423
423
  accept_language: 'es', # String | Use for knowing which language to use
424
424
  x_child_company_id: '6441b6376b60c3a638da80af' # String | In the case of a holding company, the company id of the child company to which will process the request.
@@ -480,7 +480,7 @@ end
480
480
 
481
481
  Capture Order
482
482
 
483
- Processes an order that has been previously authorized.
483
+ Captures (finalizes) an order that has been previously authorized. Use this endpoint to capture a specific amount. The captured amount must be greater than 0 and must comply with the order and charge constraints enforced by the API.
484
484
 
485
485
  ### Examples
486
486
 
@@ -498,7 +498,7 @@ id = '6307a60c41de27127515a575' # String | Identifier of the resource
498
498
  opts = {
499
499
  accept_language: 'es', # String | Use for knowing which language to use
500
500
  x_child_company_id: '6441b6376b60c3a638da80af', # String | In the case of a holding company, the company id of the child company to which will process the request.
501
- order_capture_request: DigitalFemsa::OrderCaptureRequest.new({amount: 500}) # OrderCaptureRequest | requested fields for capture order
501
+ order_capture_request: DigitalFemsa::OrderCaptureRequest.new({amount: 500}) # OrderCaptureRequest | Requested fields for capturing an order
502
502
  }
503
503
 
504
504
  begin
@@ -535,7 +535,7 @@ end
535
535
  | **id** | **String** | Identifier of the resource | |
536
536
  | **accept_language** | **String** | Use for knowing which language to use | [optional][default to 'es'] |
537
537
  | **x_child_company_id** | **String** | In the case of a holding company, the company id of the child company to which will process the request. | [optional] |
538
- | **order_capture_request** | [**OrderCaptureRequest**](OrderCaptureRequest.md) | requested fields for capture order | [optional] |
538
+ | **order_capture_request** | [**OrderCaptureRequest**](OrderCaptureRequest.md) | Requested fields for capturing an order | [optional] |
539
539
 
540
540
  ### Return type
541
541
 
@@ -555,9 +555,9 @@ end
555
555
 
556
556
  > <OrderResponse> update_order(id, order_update_request, opts)
557
557
 
558
- Update Order
558
+ Update order
559
559
 
560
- Update an existing Order.
560
+ Updates an existing order by its ID. Orders are the central resource in the API. Updating an order may also update related order sub-resources when they are included in the request payload, according to server-side validations. Only fields supported by the API can be modified.
561
561
 
562
562
  ### Examples
563
563
 
@@ -578,7 +578,7 @@ opts = {
578
578
  }
579
579
 
580
580
  begin
581
- # Update Order
581
+ # Update order
582
582
  result = api_instance.update_order(id, order_update_request, opts)
583
583
  p result
584
584
  rescue DigitalFemsa::ApiError => e
@@ -594,7 +594,7 @@ This returns an Array which contains the response data, status code and headers.
594
594
 
595
595
  ```ruby
596
596
  begin
597
- # Update Order
597
+ # Update order
598
598
  data, status_code, headers = api_instance.update_order_with_http_info(id, order_update_request, opts)
599
599
  p status_code # => 2xx
600
600
  p headers # => { ... }