digital_femsa 1.0.0 → 1.1.1

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 (187) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -0
  3. data/Gemfile.lock +104 -0
  4. data/Makefile +14 -0
  5. data/README.md +28 -33
  6. data/VERSION +1 -1
  7. data/config-ruby.json +1 -1
  8. data/digital_femsa.gemspec +1 -1
  9. data/docs/ApiKeyCreateResponse.md +1 -1
  10. data/docs/ApiKeyRequest.md +2 -2
  11. data/docs/ApiKeyResponseOnDelete.md +2 -2
  12. data/docs/ApiKeysApi.md +10 -10
  13. data/docs/BalanceResponse.md +8 -8
  14. data/docs/BalancesApi.md +1 -1
  15. data/docs/ChargeOrderResponse.md +1 -1
  16. data/docs/ChargeOrderResponseChannel.md +24 -0
  17. data/docs/ChargeRequest.md +1 -1
  18. data/docs/ChargeRequestPaymentMethod.md +3 -3
  19. data/docs/ChargeResponse.md +9 -7
  20. data/docs/ChargeResponseChannel.md +3 -3
  21. data/docs/ChargeResponseRefundsData.md +5 -1
  22. data/docs/ChargesApi.md +16 -12
  23. data/docs/ChargesDataResponse.md +9 -7
  24. data/docs/Checkout.md +17 -15
  25. data/docs/CheckoutOrderTemplate.md +3 -3
  26. data/docs/CheckoutResponse.md +1 -1
  27. data/docs/CreateCustomerFiscalEntitiesResponse.md +2 -2
  28. data/docs/Customer.md +13 -19
  29. data/docs/CustomerAddress.md +2 -2
  30. data/docs/CustomerFiscalEntitiesDataResponse.md +2 -2
  31. data/docs/CustomerFiscalEntitiesRequest.md +3 -3
  32. data/docs/CustomerInfo.md +4 -4
  33. data/docs/CustomerPaymentMethodRequest.md +1 -1
  34. data/docs/CustomerResponse.md +17 -21
  35. data/docs/CustomerShippingContactsResponse.md +5 -5
  36. data/docs/CustomersApi.md +15 -15
  37. data/docs/CustomersResponse.md +1 -1
  38. data/docs/DeleteApiKeysResponse.md +1 -1
  39. data/docs/DiscountsApi.md +9 -9
  40. data/docs/EventsApi.md +2 -2
  41. data/docs/EventsResendResponse.md +1 -1
  42. data/docs/GetChargesResponse.md +4 -4
  43. data/docs/GetTransactionsResponse.md +1 -1
  44. data/docs/LogsApi.md +1 -1
  45. data/docs/OrderFiscalEntityRequest.md +4 -4
  46. data/docs/OrderRefundRequest.md +7 -5
  47. data/docs/OrderRequest.md +17 -19
  48. data/docs/OrderResponse.md +37 -35
  49. data/docs/OrderResponseChannel.md +24 -0
  50. data/docs/OrderResponseShippingContact.md +4 -4
  51. data/docs/OrderUpdateFiscalEntityRequest.md +1 -1
  52. data/docs/OrderUpdateRequest.md +19 -15
  53. data/docs/OrdersApi.md +16 -16
  54. data/docs/PaymentLinkApi.md +12 -82
  55. data/docs/PaymentMethodCash.md +4 -4
  56. data/docs/PaymentMethodCashRequest.md +2 -2
  57. data/docs/PaymentMethodsApi.md +5 -5
  58. data/docs/Product.md +10 -12
  59. data/docs/ProductDataResponse.md +9 -11
  60. data/docs/ProductOrderResponse.md +9 -11
  61. data/docs/ProductsApi.md +7 -7
  62. data/docs/ShippingContactsApi.md +9 -9
  63. data/docs/ShippingOrderResponse.md +5 -3
  64. data/docs/ShippingRequest.md +2 -0
  65. data/docs/ShippingsApi.md +7 -7
  66. data/docs/TaxesApi.md +7 -7
  67. data/docs/TransactionResponse.md +20 -14
  68. data/docs/TransactionsApi.md +6 -6
  69. data/docs/TransfersApi.md +10 -10
  70. data/docs/UpdateCustomer.md +17 -21
  71. data/docs/UpdateCustomerFiscalEntitiesResponse.md +2 -2
  72. data/docs/UpdateOrderTaxRequest.md +2 -2
  73. data/docs/UpdateProduct.md +7 -9
  74. data/docs/WebhookKeysApi.md +18 -14
  75. data/docs/WebhooksApi.md +28 -22
  76. data/lib/digital_femsa/api/api_keys_api.rb +8 -8
  77. data/lib/digital_femsa/api/balances_api.rb +2 -2
  78. data/lib/digital_femsa/api/charges_api.rb +13 -9
  79. data/lib/digital_femsa/api/customers_api.rb +12 -12
  80. data/lib/digital_femsa/api/discounts_api.rb +12 -12
  81. data/lib/digital_femsa/api/events_api.rb +4 -4
  82. data/lib/digital_femsa/api/logs_api.rb +2 -2
  83. data/lib/digital_femsa/api/orders_api.rb +20 -20
  84. data/lib/digital_femsa/api/payment_link_api.rb +10 -86
  85. data/lib/digital_femsa/api/payment_methods_api.rb +8 -8
  86. data/lib/digital_femsa/api/products_api.rb +10 -10
  87. data/lib/digital_femsa/api/shipping_contacts_api.rb +8 -8
  88. data/lib/digital_femsa/api/shippings_api.rb +10 -10
  89. data/lib/digital_femsa/api/taxes_api.rb +10 -10
  90. data/lib/digital_femsa/api/transactions_api.rb +6 -6
  91. data/lib/digital_femsa/api/transfers_api.rb +8 -8
  92. data/lib/digital_femsa/api/webhook_keys_api.rb +14 -10
  93. data/lib/digital_femsa/api/webhooks_api.rb +23 -16
  94. data/lib/digital_femsa/api_client.rb +9 -5
  95. data/lib/digital_femsa/models/api_key_create_response.rb +1 -1
  96. data/lib/digital_femsa/models/api_key_request.rb +36 -1
  97. data/lib/digital_femsa/models/balance_response.rb +9 -9
  98. data/lib/digital_femsa/models/charge_order_response.rb +1 -1
  99. data/lib/digital_femsa/models/{order_next_action_response.rb → charge_order_response_channel.rb} +34 -18
  100. data/lib/digital_femsa/models/charge_request_payment_method.rb +3 -2
  101. data/lib/digital_femsa/models/charge_response.rb +15 -4
  102. data/lib/digital_femsa/models/charge_response_refunds_data.rb +23 -4
  103. data/lib/digital_femsa/models/charge_update_request.rb +1 -1
  104. data/lib/digital_femsa/models/charges_data_response.rb +15 -4
  105. data/lib/digital_femsa/models/checkout.rb +97 -81
  106. data/lib/digital_femsa/models/checkout_order_template.rb +4 -4
  107. data/lib/digital_femsa/models/checkout_order_template_customer_info.rb +1 -1
  108. data/lib/digital_femsa/models/checkout_request.rb +1 -1
  109. data/lib/digital_femsa/models/checkout_response.rb +1 -1
  110. data/lib/digital_femsa/models/create_customer_fiscal_entities_response.rb +10 -10
  111. data/lib/digital_femsa/models/customer.rb +57 -95
  112. data/lib/digital_femsa/models/customer_address.rb +7 -0
  113. data/lib/digital_femsa/models/customer_fiscal_entities_data_response.rb +10 -10
  114. data/lib/digital_femsa/models/customer_fiscal_entities_request.rb +13 -13
  115. data/lib/digital_femsa/models/customer_info.rb +13 -20
  116. data/lib/digital_femsa/models/customer_payment_method_request.rb +2 -2
  117. data/lib/digital_femsa/models/customer_payment_sources_inner.rb +104 -0
  118. data/lib/digital_femsa/models/customer_response.rb +122 -113
  119. data/lib/digital_femsa/models/customer_shipping_contacts_response.rb +2 -0
  120. data/lib/digital_femsa/models/customers_response.rb +1 -0
  121. data/lib/digital_femsa/models/events_resend_response.rb +1 -1
  122. data/lib/digital_femsa/models/get_charges_response.rb +21 -21
  123. data/lib/digital_femsa/models/get_transactions_response.rb +1 -1
  124. data/lib/digital_femsa/models/log_response.rb +1 -1
  125. data/lib/digital_femsa/models/logs_response.rb +1 -1
  126. data/lib/digital_femsa/models/order_fiscal_entity_response.rb +1 -1
  127. data/lib/digital_femsa/models/order_refund_request.rb +59 -11
  128. data/lib/digital_femsa/models/order_request.rb +69 -79
  129. data/lib/digital_femsa/models/order_response.rb +187 -119
  130. data/lib/digital_femsa/models/{order_next_action_response_redirect_to_url.rb → order_response_channel.rb} +35 -19
  131. data/lib/digital_femsa/models/order_response_charges.rb +1 -1
  132. data/lib/digital_femsa/models/order_response_checkout.rb +1 -0
  133. data/lib/digital_femsa/models/order_response_customer_info.rb +1 -0
  134. data/lib/digital_femsa/models/order_response_shipping_contact.rb +3 -0
  135. data/lib/digital_femsa/models/order_update_fiscal_entity_request.rb +1 -1
  136. data/lib/digital_femsa/models/order_update_request.rb +106 -65
  137. data/lib/digital_femsa/models/payment_method_cash.rb +1 -1
  138. data/lib/digital_femsa/models/payment_method_cash_request.rb +2 -1
  139. data/lib/digital_femsa/models/product.rb +103 -95
  140. data/lib/digital_femsa/models/product_data_response.rb +103 -95
  141. data/lib/digital_femsa/models/product_order_response.rb +103 -95
  142. data/lib/digital_femsa/models/shipping_order_response.rb +11 -1
  143. data/lib/digital_femsa/models/shipping_request.rb +12 -1
  144. data/lib/digital_femsa/models/transaction_response.rb +172 -99
  145. data/lib/digital_femsa/models/transfers_response.rb +1 -1
  146. data/lib/digital_femsa/models/transfers_response_destination.rb +312 -0
  147. data/lib/digital_femsa/models/update_customer.rb +42 -85
  148. data/lib/digital_femsa/models/update_customer_fiscal_entities_response.rb +10 -10
  149. data/lib/digital_femsa/models/update_order_discount_lines_request.rb +34 -0
  150. data/lib/digital_femsa/models/update_order_tax_request.rb +2 -2
  151. data/lib/digital_femsa/models/update_payment_methods_amount.rb +105 -0
  152. data/lib/digital_femsa/models/update_payment_methods_expires_at.rb +105 -0
  153. data/lib/digital_femsa/models/update_product.rb +85 -58
  154. data/lib/digital_femsa/models/webhook_key_delete_response.rb +1 -1
  155. data/lib/digital_femsa/models/webhook_key_request.rb +1 -0
  156. data/lib/digital_femsa/models/webhook_key_response.rb +1 -1
  157. data/lib/digital_femsa/models/webhook_request.rb +248 -9
  158. data/lib/digital_femsa/models/webhook_response.rb +1 -1
  159. data/lib/digital_femsa/models/webhook_update_request.rb +1 -1
  160. data/lib/digital_femsa/version.rb +1 -1
  161. data/lib/digital_femsa.rb +2 -6
  162. data/spec/api/balances_api_spec.rb +24 -22
  163. data/spec/api/charges_api_spec.rb +92 -49
  164. data/spec/api/companies_api_spec.rb +57 -35
  165. data/spec/api/customers_api_spec.rb +115 -99
  166. data/spec/api/events_api_spec.rb +72 -48
  167. data/spec/api/generated_apis_coverage_spec.rb +94 -0
  168. data/spec/api/logs_api_spec.rb +57 -38
  169. data/spec/api/orders_api_spec.rb +134 -108
  170. data/spec/api/payment_link_api_spec.rb +91 -81
  171. data/spec/api/payment_methods_api_spec.rb +102 -65
  172. data/spec/api/transactions_api_spec.rb +63 -41
  173. data/spec/api/transfers_api_spec.rb +57 -38
  174. data/spec/api/webhook_keys_api_spec.rb +87 -68
  175. data/spec/api/webhooks_api_spec.rb +110 -79
  176. data/spec/api_client_spec.rb +259 -0
  177. data/spec/models/generated_models_coverage_spec.rb +152 -0
  178. data/spec/models/webhook_request_ssrf_protection_spec.rb +275 -0
  179. data/spec/spec_helper.rb +37 -0
  180. data/templates/ruby/api_client.mustache +8 -4
  181. metadata +40 -37
  182. data/docs/CustomerAntifraudInfo.md +0 -20
  183. data/docs/CustomerAntifraudInfoResponse.md +0 -20
  184. data/docs/OrderNextActionResponse.md +0 -20
  185. data/docs/OrderNextActionResponseRedirectToUrl.md +0 -20
  186. data/docs/SmsCheckoutRequest.md +0 -18
  187. data/docs/UpdateCustomerAntifraudInfo.md +0 -20
data/docs/ChargesApi.md CHANGED
@@ -4,8 +4,8 @@ All URIs are relative to *https://api.digitalfemsa.io*
4
4
 
5
5
  | Method | HTTP request | Description |
6
6
  | ------ | ------------ | ----------- |
7
- | [**get_charges**](ChargesApi.md#get_charges) | **GET** /charges | Get A List of Charges |
8
- | [**orders_create_charge**](ChargesApi.md#orders_create_charge) | **POST** /orders/{id}/charges | Create charge |
7
+ | [**get_charges**](ChargesApi.md#get_charges) | **GET** /charges | List charges |
8
+ | [**orders_create_charge**](ChargesApi.md#orders_create_charge) | **POST** /orders/{id}/charges | Create a charge for an order |
9
9
  | [**update_charge**](ChargesApi.md#update_charge) | **PUT** /charges/{id} | Update a charge |
10
10
 
11
11
 
@@ -13,7 +13,9 @@ All URIs are relative to *https://api.digitalfemsa.io*
13
13
 
14
14
  > <GetChargesResponse> get_charges(opts)
15
15
 
16
- Get A List of Charges
16
+ List charges
17
+
18
+ Retrieves a paginated list of charges for the authenticated account. Use the pagination parameters (`limit`, `next_page`, `previous_page`) to navigate through results. Use `search` to filter charges (for example by id or reference).
17
19
 
18
20
  ### Examples
19
21
 
@@ -31,13 +33,13 @@ opts = {
31
33
  accept_language: 'es', # String | Use for knowing which language to use
32
34
  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.
33
35
  limit: 56, # Integer | The numbers of items to return, the maximum value is 250
34
- search: 'search_example', # String | General order search, e.g. by mail, reference etc.
35
36
  _next: '_next_example', # String | next page
36
- previous: 'previous_example' # String | previous page
37
+ previous: 'previous_example', # String | previous page
38
+ search: 'search_example' # String | General order search, e.g. by mail, reference etc.
37
39
  }
38
40
 
39
41
  begin
40
- # Get A List of Charges
42
+ # List charges
41
43
  result = api_instance.get_charges(opts)
42
44
  p result
43
45
  rescue DigitalFemsa::ApiError => e
@@ -53,7 +55,7 @@ This returns an Array which contains the response data, status code and headers.
53
55
 
54
56
  ```ruby
55
57
  begin
56
- # Get A List of Charges
58
+ # List charges
57
59
  data, status_code, headers = api_instance.get_charges_with_http_info(opts)
58
60
  p status_code # => 2xx
59
61
  p headers # => { ... }
@@ -70,9 +72,9 @@ end
70
72
  | **accept_language** | **String** | Use for knowing which language to use | [optional][default to &#39;es&#39;] |
71
73
  | **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] |
72
74
  | **limit** | **Integer** | The numbers of items to return, the maximum value is 250 | [optional][default to 20] |
73
- | **search** | **String** | General order search, e.g. by mail, reference etc. | [optional] |
74
75
  | **_next** | **String** | next page | [optional] |
75
76
  | **previous** | **String** | previous page | [optional] |
77
+ | **search** | **String** | General order search, e.g. by mail, reference etc. | [optional] |
76
78
 
77
79
  ### Return type
78
80
 
@@ -92,9 +94,9 @@ end
92
94
 
93
95
  > <ChargeOrderResponse> orders_create_charge(id, charge_request, opts)
94
96
 
95
- Create charge
97
+ Create a charge for an order
96
98
 
97
- Create charge for an existing orden
99
+ Creates a new charge associated with an existing order. Notes: - The charge is created for the order identified by the path parameter `id`. - Depending on the payment method, the charge may be created in a non-final status (for example, pending). - If the order does not meet the required conditions, the API may respond with **428 Precondition Required**.
98
100
 
99
101
  ### Examples
100
102
 
@@ -116,7 +118,7 @@ opts = {
116
118
  }
117
119
 
118
120
  begin
119
- # Create charge
121
+ # Create a charge for an order
120
122
  result = api_instance.orders_create_charge(id, charge_request, opts)
121
123
  p result
122
124
  rescue DigitalFemsa::ApiError => e
@@ -132,7 +134,7 @@ This returns an Array which contains the response data, status code and headers.
132
134
 
133
135
  ```ruby
134
136
  begin
135
- # Create charge
137
+ # Create a charge for an order
136
138
  data, status_code, headers = api_instance.orders_create_charge_with_http_info(id, charge_request, opts)
137
139
  p status_code # => 2xx
138
140
  p headers # => { ... }
@@ -171,6 +173,8 @@ end
171
173
 
172
174
  Update a charge
173
175
 
176
+ Updates an existing charge. Only `reference_id` can be updated.
177
+
174
178
  ### Examples
175
179
 
176
180
  ```ruby
@@ -22,6 +22,7 @@
22
22
  | **reference_id** | **String** | Reference ID of the charge | [optional] |
23
23
  | **refunds** | [**ChargeResponseRefunds**](ChargeResponseRefunds.md) | | [optional] |
24
24
  | **status** | **String** | | [optional] |
25
+ | **is_refundable** | **Boolean** | | [optional] |
25
26
 
26
27
  ## Example
27
28
 
@@ -29,24 +30,25 @@
29
30
  require 'digital_femsa'
30
31
 
31
32
  instance = DigitalFemsa::ChargesDataResponse.new(
32
- amount: 4321,
33
+ amount: 600000,
33
34
  channel: null,
34
- created_at: 1676386026,
35
+ created_at: 1768581166,
35
36
  currency: MXN,
36
37
  customer_id: null,
37
38
  description: Payment from order,
38
39
  device_fingerprint: 6FR3chaU4Y1nGAW5NAGd1rcjAKa142Ba,
39
40
  failure_code: suspected_fraud,
40
41
  failure_message: Este cargo ha sido declinado porque el comportamiento del comprador es sospechoso.,
41
- id: 63efa757cf65380001aec040,
42
- livemode: null,
42
+ id: 696a682e1ef5ca00015698b7,
43
+ livemode: true,
43
44
  object: null,
44
- order_id: ord_2tN73UdUSNrYRPD9r,
45
- paid_at: 1676390742,
45
+ order_id: ord_2zNwzJrfNC24uQUzq,
46
+ paid_at: null,
46
47
  payment_method: null,
47
48
  reference_id: ref_2tN73UdUSNrYRPD9r,
48
49
  refunds: null,
49
- status: pending_payment
50
+ status: pending_payment,
51
+ is_refundable: false
50
52
  )
51
53
  ```
52
54
 
data/docs/Checkout.md CHANGED
@@ -4,15 +4,16 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **allowed_payment_methods** | **Array&lt;String&gt;** | Those are the payment methods that will be available for the link | |
8
- | **expires_at** | **Integer** | It is the time when the link will expire. It is expressed in seconds since the Unix epoch. The valid range is from 2 to 365 days (the valid range will be taken from the next day of the creation date at 00:01 hrs) | |
9
- | **name** | **String** | Reason for charge | |
10
- | **needs_shipping_contact** | **Boolean** | This flag allows you to fill in the shipping information at checkout. | [optional] |
11
- | **on_demand_enabled** | **Boolean** | This flag allows you to specify if the link will be on demand. | [optional] |
12
- | **order_template** | [**CheckoutOrderTemplate**](CheckoutOrderTemplate.md) | | |
13
- | **payments_limit_count** | **Integer** | It is the number of payments that can be made through the link. | [optional] |
7
+ | **name** | **String** | Payment link name. | |
8
+ | **type** | **String** | Checkout type. | |
14
9
  | **recurrent** | **Boolean** | false: single use. true: multiple payments | |
15
- | **type** | **String** | It is the type of link that will be created. It must be a valid type. | |
10
+ | **payments_limit_count** | **Integer** | Required when &#x60;recurrent&#x60; is true. Maximum number of payments allowed through the link. | [optional] |
11
+ | **allowed_payment_methods** | **Array&lt;String&gt;** | Payment methods available in the payment link. | |
12
+ | **needs_shipping_contact** | **Boolean** | This flag allows you to fill in the shipping information at checkout. | |
13
+ | **starts_at** | **Integer** | Start time for the link. Unix timestamp in seconds. | [optional] |
14
+ | **expires_at** | **Integer** | Expiration time for the link (Unix timestamp in seconds). Valid range is between 2 and 365 days (calculated from the next day of creation at 00:01). | |
15
+ | **can_not_expire** | **Boolean** | If true, the link does not expire. | [optional] |
16
+ | **order_template** | [**CheckoutOrderTemplate**](CheckoutOrderTemplate.md) | | |
16
17
 
17
18
  ## Example
18
19
 
@@ -20,15 +21,16 @@
20
21
  require 'digital_femsa'
21
22
 
22
23
  instance = DigitalFemsa::Checkout.new(
24
+ name: Payment Link Name,
25
+ type: PaymentLink,
26
+ recurrent: false,
27
+ payments_limit_count: null,
23
28
  allowed_payment_methods: [&quot;cash&quot;],
24
- expires_at: 1680397724,
25
- name: Payment Link Name 1594138857,
26
29
  needs_shipping_contact: false,
27
- on_demand_enabled: true,
28
- order_template: null,
29
- payments_limit_count: 5,
30
- recurrent: false,
31
- type: PaymentLink
30
+ starts_at: 1680224924,
31
+ expires_at: 1680397724,
32
+ can_not_expire: false,
33
+ order_template: null
32
34
  )
33
35
  ```
34
36
 
@@ -4,10 +4,10 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **currency** | **String** | It is the currency in which the order will be created. It must be a valid ISO 4217 currency code. | |
7
+ | **currency** | **String** | ISO 4217 currency code for the order. | |
8
8
  | **customer_info** | [**CheckoutOrderTemplateCustomerInfo**](CheckoutOrderTemplateCustomerInfo.md) | | [optional] |
9
- | **line_items** | [**Array&lt;Product&gt;**](Product.md) | They are the products to buy. Each contains the \&quot;unit price\&quot; and \&quot;quantity\&quot; parameters that are used to calculate the total amount of the order. | |
10
- | **metadata** | **Hash&lt;String, Object&gt;** | It is a set of key-value pairs that you can attach to the order. It can be used to store additional information about the order in a structured format. | [optional] |
9
+ | **line_items** | [**Array&lt;Product&gt;**](Product.md) | Products to buy. Each contains unit price and quantity used to calculate the order total. | |
10
+ | **metadata** | **Hash&lt;String, Object&gt;** | Arbitrary key-value data attached to the order for internal use. | [optional] |
11
11
 
12
12
  ## Example
13
13
 
@@ -12,7 +12,7 @@
12
12
  | **id** | **String** | | |
13
13
  | **livemode** | **Boolean** | | |
14
14
  | **metadata** | **Hash&lt;String, Object&gt;** | | [optional] |
15
- | **name** | **String** | Reason for charge | |
15
+ | **name** | **String** | Payment link name | |
16
16
  | **needs_shipping_contact** | **Boolean** | | [optional] |
17
17
  | **object** | **String** | | |
18
18
  | **paid_payments_count** | **Integer** | | [optional] |
@@ -6,10 +6,10 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **address** | [**CustomerAddress**](CustomerAddress.md) | | |
8
8
  | **tax_id** | **String** | | [optional] |
9
+ | **name** | **String** | | [optional] |
9
10
  | **email** | **String** | | [optional] |
10
11
  | **phone** | **String** | | [optional] |
11
12
  | **metadata** | **Hash&lt;String, Object&gt;** | | [optional] |
12
- | **company_name** | **String** | | [optional] |
13
13
  | **id** | **String** | | |
14
14
  | **object** | **String** | | |
15
15
  | **created_at** | **Integer** | | |
@@ -24,10 +24,10 @@ require 'digital_femsa'
24
24
  instance = DigitalFemsa::CreateCustomerFiscalEntitiesResponse.new(
25
25
  address: null,
26
26
  tax_id: null,
27
+ name: Femsa,
27
28
  email: null,
28
29
  phone: null,
29
30
  metadata: null,
30
- company_name: Femsa,
31
31
  id: ship_cont_2tKZsTYcsryyu7Ah8,
32
32
  object: shipping_contact,
33
33
  created_at: 1675715413,
data/docs/Customer.md CHANGED
@@ -4,18 +4,15 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **antifraud_info** | [**CustomerAntifraudInfo**](CustomerAntifraudInfo.md) | | [optional] |
8
- | **corporate** | **Boolean** | It is a value that allows identifying if the email is corporate or not. | [optional][default to false] |
9
- | **custom_reference** | **String** | It is an undefined value. | [optional] |
10
- | **email** | **String** | An email address is a series of customizable characters followed by a universal Internet symbol, the at symbol (@), the name of a host server, and a web domain ending (.mx, .com, .org, . net, etc). | |
11
- | **default_payment_source_id** | **String** | It is a parameter that allows to identify in the response, the Femsa ID of a payment method (payment_id) | [optional] |
12
- | **default_shipping_contact_id** | **String** | It is a parameter that allows to identify in the response, the Femsa ID of the shipping address (shipping_contact) | [optional] |
13
- | **fiscal_entities** | [**Array&lt;CustomerFiscalEntitiesRequest&gt;**](CustomerFiscalEntitiesRequest.md) | | [optional] |
14
- | **metadata** | **Hash&lt;String, Object&gt;** | | [optional] |
15
- | **name** | **String** | Client&#39;s name | |
16
- | **payment_sources** | [**Array&lt;CustomerPaymentMethodsRequest&gt;**](CustomerPaymentMethodsRequest.md) | Contains details of the payment methods that the customer has active or has used in Femsa | [optional] |
17
- | **phone** | **String** | Is the customer&#39;s phone number | |
18
- | **shipping_contacts** | [**Array&lt;CustomerShippingContacts&gt;**](CustomerShippingContacts.md) | Contains the detail of the shipping addresses that the client has active or has used in Femsa | [optional] |
7
+ | **name** | **String** | Customer&#39;s name. | |
8
+ | **email** | **String** | Customer email address. | |
9
+ | **phone** | **String** | Customer phone number. | [optional] |
10
+ | **corporate** | **Boolean** | Indicates whether the customer email is corporate. | [optional][default to false] |
11
+ | **custom_reference** | **String** | Merchant-defined reference used to identify the customer in your system. | [optional] |
12
+ | **metadata** | **Hash&lt;String, Object&gt;** | Arbitrary metadata associated with the customer. | [optional] |
13
+ | **payment_sources** | [**Array&lt;CustomerPaymentMethodsRequest&gt;**](CustomerPaymentMethodsRequest.md) | Customer payment sources to be created with the customer (optional). | [optional] |
14
+ | **fiscal_entities** | [**Array&lt;CustomerFiscalEntitiesRequest&gt;**](CustomerFiscalEntitiesRequest.md) | Customer fiscal entities to be created with the customer (optional). | [optional] |
15
+ | **shipping_contacts** | [**Array&lt;CustomerShippingContacts&gt;**](CustomerShippingContacts.md) | Customer shipping contacts to be created with the customer (optional). | [optional] |
19
16
 
20
17
  ## Example
21
18
 
@@ -23,17 +20,14 @@
23
20
  require 'digital_femsa'
24
21
 
25
22
  instance = DigitalFemsa::Customer.new(
26
- antifraud_info: null,
23
+ name: miguel,
24
+ email: miguel@gmail.com,
25
+ phone: +5215555555555,
27
26
  corporate: false,
28
27
  custom_reference: null,
29
- email: miguel@gmail.com,
30
- default_payment_source_id: src_1a2b3c4d5e6f7g8h,
31
- default_shipping_contact_id: ship_cont_1a2b3c4d5e6f7g8h,
32
- fiscal_entities: null,
33
28
  metadata: null,
34
- name: miguel,
35
29
  payment_sources: null,
36
- phone: +5215555555555,
30
+ fiscal_entities: null,
37
31
  shipping_contacts: null
38
32
  )
39
33
  ```
@@ -9,7 +9,7 @@
9
9
  | **postal_code** | **String** | | |
10
10
  | **city** | **String** | | |
11
11
  | **state** | **String** | | [optional] |
12
- | **country** | **String** | this field follows the [ISO 3166-1 alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) | [optional] |
12
+ | **country** | **String** | this field follows the [ISO 3166-1 alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) | |
13
13
  | **residential** | **Boolean** | | [optional][default to false] |
14
14
  | **external_number** | **String** | | [optional] |
15
15
 
@@ -26,7 +26,7 @@ instance = DigitalFemsa::CustomerAddress.new(
26
26
  state: Ciudad de Mexico,
27
27
  country: MX,
28
28
  residential: true,
29
- external_number: null
29
+ external_number: string
30
30
  )
31
31
  ```
32
32
 
@@ -6,10 +6,10 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **address** | [**CustomerAddress**](CustomerAddress.md) | | |
8
8
  | **tax_id** | **String** | | [optional] |
9
+ | **name** | **String** | | [optional] |
9
10
  | **email** | **String** | | [optional] |
10
11
  | **phone** | **String** | | [optional] |
11
12
  | **metadata** | **Hash&lt;String, Object&gt;** | | [optional] |
12
- | **company_name** | **String** | | [optional] |
13
13
  | **id** | **String** | | |
14
14
  | **object** | **String** | | |
15
15
  | **created_at** | **Integer** | | |
@@ -24,10 +24,10 @@ require 'digital_femsa'
24
24
  instance = DigitalFemsa::CustomerFiscalEntitiesDataResponse.new(
25
25
  address: null,
26
26
  tax_id: null,
27
+ name: Femsa,
27
28
  email: null,
28
29
  phone: null,
29
30
  metadata: null,
30
- company_name: Femsa,
31
31
  id: ship_cont_2tKZsTYcsryyu7Ah8,
32
32
  object: shipping_contact,
33
33
  created_at: 1675715413,
@@ -6,10 +6,10 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **address** | [**CustomerAddress**](CustomerAddress.md) | | |
8
8
  | **tax_id** | **String** | | [optional] |
9
+ | **name** | **String** | | [optional] |
9
10
  | **email** | **String** | | [optional] |
10
11
  | **phone** | **String** | | [optional] |
11
12
  | **metadata** | **Hash&lt;String, Object&gt;** | | [optional] |
12
- | **company_name** | **String** | | [optional] |
13
13
 
14
14
  ## Example
15
15
 
@@ -19,10 +19,10 @@ require 'digital_femsa'
19
19
  instance = DigitalFemsa::CustomerFiscalEntitiesRequest.new(
20
20
  address: null,
21
21
  tax_id: null,
22
+ name: Femsa,
22
23
  email: null,
23
24
  phone: null,
24
- metadata: null,
25
- company_name: Femsa
25
+ metadata: null
26
26
  )
27
27
  ```
28
28
 
data/docs/CustomerInfo.md CHANGED
@@ -4,11 +4,11 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
+ | **customer_id** | **String** | | [optional] |
7
8
  | **name** | **String** | | |
8
9
  | **email** | **String** | | |
9
- | **phone** | **String** | | |
10
+ | **phone** | **String** | | [optional] |
10
11
  | **corporate** | **Boolean** | | [optional] |
11
- | **object** | **String** | | [optional] |
12
12
 
13
13
  ## Example
14
14
 
@@ -16,11 +16,11 @@
16
16
  require 'digital_femsa'
17
17
 
18
18
  instance = DigitalFemsa::CustomerInfo.new(
19
+ customer_id: cus_23874283647,
19
20
  name: DevTest,
20
21
  email: test@femsa.com,
21
22
  phone: 5522997233,
22
- corporate: null,
23
- object: customer_info
23
+ corporate: null
24
24
  )
25
25
  ```
26
26
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **type** | **String** | Type of payment method | |
7
+ | **type** | **String** | Type of payment method. | |
8
8
 
9
9
  ## Example
10
10
 
@@ -4,22 +4,20 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **antifraud_info** | [**CustomerAntifraudInfoResponse**](CustomerAntifraudInfoResponse.md) | | [optional] |
7
+ | **id** | **String** | Customer&#39;s ID | |
8
+ | **object** | **String** | | |
9
+ | **created_at** | **Integer** | Creation date of the object (Unix timestamp) | |
10
+ | **livemode** | **Boolean** | true if the object exists in live mode or false if the object exists in test mode | |
11
+ | **name** | **String** | Customer&#39;s name | [optional] |
12
+ | **email** | **String** | | [optional] |
13
+ | **phone** | **String** | Customer&#39;s phone number | [optional] |
8
14
  | **corporate** | **Boolean** | true if the customer is a company | [optional] |
9
- | **created_at** | **Integer** | Creation date of the object | |
10
15
  | **custom_reference** | **String** | Custom reference | [optional] |
11
16
  | **default_fiscal_entity_id** | **String** | | [optional] |
12
17
  | **default_shipping_contact_id** | **String** | | [optional] |
13
- | **default_payment_source_id** | **String** | | [optional] |
14
- | **email** | **String** | | [optional] |
15
- | **fiscal_entities** | [**CustomerFiscalEntitiesResponse**](CustomerFiscalEntitiesResponse.md) | | [optional] |
16
- | **id** | **String** | Customer&#39;s ID | |
17
- | **livemode** | **Boolean** | true if the object exists in live mode or the value false if the object exists in test mode | |
18
- | **name** | **String** | Customer&#39;s name | |
19
- | **metadata** | **Hash&lt;String, Object&gt;** | | [optional] |
20
- | **object** | **String** | | |
18
+ | **metadata** | **Hash&lt;String, Object&gt;** | Customer metadata (maps to contextual_data in backend) | [optional] |
21
19
  | **payment_sources** | [**CustomerPaymentMethodsResponse**](CustomerPaymentMethodsResponse.md) | | [optional] |
22
- | **phone** | **String** | Customer&#39;s phone number | [optional] |
20
+ | **fiscal_entities** | [**CustomerFiscalEntitiesResponse**](CustomerFiscalEntitiesResponse.md) | | [optional] |
23
21
  | **shipping_contacts** | [**CustomerResponseShippingContacts**](CustomerResponseShippingContacts.md) | | [optional] |
24
22
 
25
23
  ## Example
@@ -28,22 +26,20 @@
28
26
  require 'digital_femsa'
29
27
 
30
28
  instance = DigitalFemsa::CustomerResponse.new(
31
- antifraud_info: null,
32
- corporate: null,
29
+ id: cus_2tHJfJ79KyUwpxTik,
30
+ object: customer,
33
31
  created_at: 1485151007,
32
+ livemode: true,
33
+ name: Felipe,
34
+ email: felipe@gmail.com,
35
+ phone: 5215555555555,
36
+ corporate: false,
34
37
  custom_reference: custom_reference,
35
38
  default_fiscal_entity_id: fis_ent_2tKqqAfqPi21oCmEJ,
36
39
  default_shipping_contact_id: ship_cont_2tKZsTYcsryyu7Ah8,
37
- default_payment_source_id: src_2tHJfJ79KyUwpxTio,
38
- email: Felipe@gmail.com,
39
- fiscal_entities: null,
40
- id: cus_2tHJfJ79KyUwpxTik,
41
- livemode: true,
42
- name: Felipe,
43
40
  metadata: null,
44
- object: customer,
45
41
  payment_sources: null,
46
- phone: +5215555555555,
42
+ fiscal_entities: null,
47
43
  shipping_contacts: null
48
44
  )
49
45
  ```
@@ -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&lt;String, Object&gt;** | 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::CustomerShippingContactsResponse.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
- id: adr_1234567890,
31
+ id: ship_cont_1234567890,
32
32
  created_at: 1675715413,
33
33
  metadata: null,
34
34
  object: shipping_contact,
35
- deleted: false
35
+ deleted: true
36
36
  )
37
37
  ```
38
38
 
data/docs/CustomersApi.md CHANGED
@@ -4,22 +4,22 @@ All URIs are relative to *https://api.digitalfemsa.io*
4
4
 
5
5
  | Method | HTTP request | Description |
6
6
  | ------ | ------------ | ----------- |
7
- | [**create_customer**](CustomersApi.md#create_customer) | **POST** /customers | Create customer |
7
+ | [**create_customer**](CustomersApi.md#create_customer) | **POST** /customers | Create a customer |
8
8
  | [**create_customer_fiscal_entities**](CustomersApi.md#create_customer_fiscal_entities) | **POST** /customers/{id}/fiscal_entities | Create Fiscal Entity |
9
9
  | [**delete_customer_by_id**](CustomersApi.md#delete_customer_by_id) | **DELETE** /customers/{id} | Delete Customer |
10
10
  | [**get_customer_by_id**](CustomersApi.md#get_customer_by_id) | **GET** /customers/{id} | Get Customer |
11
11
  | [**get_customers**](CustomersApi.md#get_customers) | **GET** /customers | Get a list of customers |
12
12
  | [**update_customer**](CustomersApi.md#update_customer) | **PUT** /customers/{id} | Update customer |
13
- | [**update_customer_fiscal_entities**](CustomersApi.md#update_customer_fiscal_entities) | **PUT** /customers/{id}/fiscal_entities/{fiscal_entities_id} | Update Fiscal Entity |
13
+ | [**update_customer_fiscal_entities**](CustomersApi.md#update_customer_fiscal_entities) | **PUT** /customers/{id}/fiscal_entities/{fiscal_entities_id} | Update Fiscal Entity |
14
14
 
15
15
 
16
16
  ## create_customer
17
17
 
18
18
  > <CustomerResponse> create_customer(customer, opts)
19
19
 
20
- Create customer
20
+ Create a customer
21
21
 
22
- The purpose of business is to create and keep a customer, you will learn what elements you need to create a customer.
22
+ Creates a new customer for the authenticated company. Use customers to store and reuse buyer information (for example name, email, phone, and addresses). The created customer can be referenced later when creating orders and other resources.
23
23
 
24
24
  ### Examples
25
25
 
@@ -33,14 +33,14 @@ DigitalFemsa.configure do |config|
33
33
  end
34
34
 
35
35
  api_instance = DigitalFemsa::CustomersApi.new
36
- customer = DigitalFemsa::Customer.new({email: 'miguel@gmail.com', name: 'miguel', phone: '+5215555555555'}) # Customer | requested field for customer
36
+ customer = DigitalFemsa::Customer.new({name: 'miguel', email: 'miguel@gmail.com'}) # Customer | requested field for customer
37
37
  opts = {
38
38
  accept_language: 'es', # String | Use for knowing which language to use
39
39
  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.
40
40
  }
41
41
 
42
42
  begin
43
- # Create customer
43
+ # Create a customer
44
44
  result = api_instance.create_customer(customer, opts)
45
45
  p result
46
46
  rescue DigitalFemsa::ApiError => e
@@ -56,7 +56,7 @@ This returns an Array which contains the response data, status code and headers.
56
56
 
57
57
  ```ruby
58
58
  begin
59
- # Create customer
59
+ # Create a customer
60
60
  data, status_code, headers = api_instance.create_customer_with_http_info(customer, opts)
61
61
  p status_code # => 2xx
62
62
  p headers # => { ... }
@@ -94,7 +94,7 @@ end
94
94
 
95
95
  Create Fiscal Entity
96
96
 
97
- Create Fiscal entity resource that corresponds to a customer ID.
97
+ Create a fiscal entity resource for a given customer ID.
98
98
 
99
99
  ### Examples
100
100
 
@@ -109,7 +109,7 @@ end
109
109
 
110
110
  api_instance = DigitalFemsa::CustomersApi.new
111
111
  id = '6307a60c41de27127515a575' # String | Identifier of the resource
112
- customer_fiscal_entities_request = DigitalFemsa::CustomerFiscalEntitiesRequest.new({address: DigitalFemsa::CustomerAddress.new({street1: 'Nuevo Leon 254', postal_code: '06100', city: 'Ciudad de Mexico'})}) # CustomerFiscalEntitiesRequest | requested field for customer fiscal entities
112
+ customer_fiscal_entities_request = DigitalFemsa::CustomerFiscalEntitiesRequest.new({address: DigitalFemsa::CustomerAddress.new({street1: 'Nuevo Leon 254', postal_code: '06100', city: 'Ciudad de Mexico', country: 'MX'})}) # CustomerFiscalEntitiesRequest | requested field for customer fiscal entities
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.
@@ -321,7 +321,7 @@ end
321
321
 
322
322
  Get a list of customers
323
323
 
324
- The purpose of business is to create and maintain a client, you will learn what elements you need to obtain a list of clients, which can be paged.
324
+ Returns a paginated list of customers for the authenticated company. Use the [search] parameter to filter results.
325
325
 
326
326
  ### Examples
327
327
 
@@ -477,7 +477,7 @@ end
477
477
 
478
478
  > <UpdateCustomerFiscalEntitiesResponse> update_customer_fiscal_entities(id, fiscal_entities_id, customer_update_fiscal_entities_request, opts)
479
479
 
480
- Update Fiscal Entity
480
+ Update Fiscal Entity
481
481
 
482
482
  Update Fiscal Entity resource that corresponds to a customer ID.
483
483
 
@@ -495,14 +495,14 @@ end
495
495
  api_instance = DigitalFemsa::CustomersApi.new
496
496
  id = '6307a60c41de27127515a575' # String | Identifier of the resource
497
497
  fiscal_entities_id = 'fis_ent_2tQ8HkkfbauaKP9Ho' # String | identifier
498
- customer_update_fiscal_entities_request = DigitalFemsa::CustomerUpdateFiscalEntitiesRequest.new # CustomerUpdateFiscalEntitiesRequest | requested field for customer update fiscal entities
498
+ customer_update_fiscal_entities_request = DigitalFemsa::CustomerUpdateFiscalEntitiesRequest.new # CustomerUpdateFiscalEntitiesRequest | Request body for updating a customer fiscal entity.
499
499
  opts = {
500
500
  accept_language: 'es', # String | Use for knowing which language to use
501
501
  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.
502
502
  }
503
503
 
504
504
  begin
505
- # Update Fiscal Entity
505
+ # Update Fiscal Entity
506
506
  result = api_instance.update_customer_fiscal_entities(id, fiscal_entities_id, customer_update_fiscal_entities_request, opts)
507
507
  p result
508
508
  rescue DigitalFemsa::ApiError => e
@@ -518,7 +518,7 @@ This returns an Array which contains the response data, status code and headers.
518
518
 
519
519
  ```ruby
520
520
  begin
521
- # Update Fiscal Entity
521
+ # Update Fiscal Entity
522
522
  data, status_code, headers = api_instance.update_customer_fiscal_entities_with_http_info(id, fiscal_entities_id, customer_update_fiscal_entities_request, opts)
523
523
  p status_code # => 2xx
524
524
  p headers # => { ... }
@@ -534,7 +534,7 @@ end
534
534
  | ---- | ---- | ----------- | ----- |
535
535
  | **id** | **String** | Identifier of the resource | |
536
536
  | **fiscal_entities_id** | **String** | identifier | |
537
- | **customer_update_fiscal_entities_request** | [**CustomerUpdateFiscalEntitiesRequest**](CustomerUpdateFiscalEntitiesRequest.md) | requested field for customer update fiscal entities | |
537
+ | **customer_update_fiscal_entities_request** | [**CustomerUpdateFiscalEntitiesRequest**](CustomerUpdateFiscalEntitiesRequest.md) | Request body for updating a customer fiscal entity. | |
538
538
  | **accept_language** | **String** | Use for knowing which language to use | [optional][default to &#39;es&#39;] |
539
539
  | **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] |
540
540
 
@@ -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&lt;CustomerResponse&gt;**](CustomerResponse.md) | | [optional] |
11
+ | **data** | [**Array&lt;CustomerResponse&gt;**](CustomerResponse.md) | Customers | [optional] |
12
12
 
13
13
  ## Example
14
14
 
@@ -20,7 +20,7 @@
20
20
  require 'digital_femsa'
21
21
 
22
22
  instance = DigitalFemsa::DeleteApiKeysResponse.new(
23
- active: true,
23
+ active: false,
24
24
  created_at: 1684167881,
25
25
  description: online store,
26
26
  livemode: false,