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
@@ -14,46 +14,50 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module DigitalFemsa
17
- # It is a sub-resource of the Order model that can be stipulated in order to configure its corresponding checkout
17
+ # Creates a Payment Link. This is a sub-resource related to an Order template: each time a customer pays using the link, the API will create an Order using `order_template`.
18
18
  class Checkout
19
- # Those are the payment methods that will be available for the link
20
- attr_accessor :allowed_payment_methods
19
+ # Payment link name.
20
+ attr_accessor :name
21
21
 
22
- # 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)
23
- attr_accessor :expires_at
22
+ # Checkout type.
23
+ attr_accessor :type
24
24
 
25
- # Reason for charge
26
- attr_accessor :name
25
+ # false: single use. true: multiple payments
26
+ attr_accessor :recurrent
27
+
28
+ # Required when `recurrent` is true. Maximum number of payments allowed through the link.
29
+ attr_accessor :payments_limit_count
30
+
31
+ # Payment methods available in the payment link.
32
+ attr_accessor :allowed_payment_methods
27
33
 
28
34
  # This flag allows you to fill in the shipping information at checkout.
29
35
  attr_accessor :needs_shipping_contact
30
36
 
31
- # This flag allows you to specify if the link will be on demand.
32
- attr_accessor :on_demand_enabled
33
-
34
- attr_accessor :order_template
37
+ # Start time for the link. Unix timestamp in seconds.
38
+ attr_accessor :starts_at
35
39
 
36
- # It is the number of payments that can be made through the link.
37
- attr_accessor :payments_limit_count
40
+ # 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).
41
+ attr_accessor :expires_at
38
42
 
39
- # false: single use. true: multiple payments
40
- attr_accessor :recurrent
43
+ # If true, the link does not expire.
44
+ attr_accessor :can_not_expire
41
45
 
42
- # It is the type of link that will be created. It must be a valid type.
43
- attr_accessor :type
46
+ attr_accessor :order_template
44
47
 
45
48
  # Attribute mapping from ruby-style variable name to JSON key.
46
49
  def self.attribute_map
47
50
  {
48
- :'allowed_payment_methods' => :'allowed_payment_methods',
49
- :'expires_at' => :'expires_at',
50
51
  :'name' => :'name',
51
- :'needs_shipping_contact' => :'needs_shipping_contact',
52
- :'on_demand_enabled' => :'on_demand_enabled',
53
- :'order_template' => :'order_template',
54
- :'payments_limit_count' => :'payments_limit_count',
52
+ :'type' => :'type',
55
53
  :'recurrent' => :'recurrent',
56
- :'type' => :'type'
54
+ :'payments_limit_count' => :'payments_limit_count',
55
+ :'allowed_payment_methods' => :'allowed_payment_methods',
56
+ :'needs_shipping_contact' => :'needs_shipping_contact',
57
+ :'starts_at' => :'starts_at',
58
+ :'expires_at' => :'expires_at',
59
+ :'can_not_expire' => :'can_not_expire',
60
+ :'order_template' => :'order_template'
57
61
  }
58
62
  end
59
63
 
@@ -65,22 +69,22 @@ module DigitalFemsa
65
69
  # Attribute type mapping.
66
70
  def self.openapi_types
67
71
  {
68
- :'allowed_payment_methods' => :'Array<String>',
69
- :'expires_at' => :'Integer',
70
72
  :'name' => :'String',
71
- :'needs_shipping_contact' => :'Boolean',
72
- :'on_demand_enabled' => :'Boolean',
73
- :'order_template' => :'CheckoutOrderTemplate',
74
- :'payments_limit_count' => :'Integer',
73
+ :'type' => :'String',
75
74
  :'recurrent' => :'Boolean',
76
- :'type' => :'String'
75
+ :'payments_limit_count' => :'Integer',
76
+ :'allowed_payment_methods' => :'Array<String>',
77
+ :'needs_shipping_contact' => :'Boolean',
78
+ :'starts_at' => :'Integer',
79
+ :'expires_at' => :'Integer',
80
+ :'can_not_expire' => :'Boolean',
81
+ :'order_template' => :'CheckoutOrderTemplate'
77
82
  }
78
83
  end
79
84
 
80
85
  # List of attributes with nullable: true
81
86
  def self.openapi_nullable
82
87
  Set.new([
83
- :'on_demand_enabled',
84
88
  ])
85
89
  end
86
90
 
@@ -99,54 +103,60 @@ module DigitalFemsa
99
103
  h[k.to_sym] = v
100
104
  }
101
105
 
102
- if attributes.key?(:'allowed_payment_methods')
103
- if (value = attributes[:'allowed_payment_methods']).is_a?(Array)
104
- self.allowed_payment_methods = value
105
- end
106
+ if attributes.key?(:'name')
107
+ self.name = attributes[:'name']
106
108
  else
107
- self.allowed_payment_methods = nil
109
+ self.name = nil
108
110
  end
109
111
 
110
- if attributes.key?(:'expires_at')
111
- self.expires_at = attributes[:'expires_at']
112
+ if attributes.key?(:'type')
113
+ self.type = attributes[:'type']
112
114
  else
113
- self.expires_at = nil
115
+ self.type = nil
114
116
  end
115
117
 
116
- if attributes.key?(:'name')
117
- self.name = attributes[:'name']
118
+ if attributes.key?(:'recurrent')
119
+ self.recurrent = attributes[:'recurrent']
118
120
  else
119
- self.name = nil
121
+ self.recurrent = nil
120
122
  end
121
123
 
122
- if attributes.key?(:'needs_shipping_contact')
123
- self.needs_shipping_contact = attributes[:'needs_shipping_contact']
124
+ if attributes.key?(:'payments_limit_count')
125
+ self.payments_limit_count = attributes[:'payments_limit_count']
124
126
  end
125
127
 
126
- if attributes.key?(:'on_demand_enabled')
127
- self.on_demand_enabled = attributes[:'on_demand_enabled']
128
+ if attributes.key?(:'allowed_payment_methods')
129
+ if (value = attributes[:'allowed_payment_methods']).is_a?(Array)
130
+ self.allowed_payment_methods = value
131
+ end
132
+ else
133
+ self.allowed_payment_methods = nil
128
134
  end
129
135
 
130
- if attributes.key?(:'order_template')
131
- self.order_template = attributes[:'order_template']
136
+ if attributes.key?(:'needs_shipping_contact')
137
+ self.needs_shipping_contact = attributes[:'needs_shipping_contact']
132
138
  else
133
- self.order_template = nil
139
+ self.needs_shipping_contact = nil
134
140
  end
135
141
 
136
- if attributes.key?(:'payments_limit_count')
137
- self.payments_limit_count = attributes[:'payments_limit_count']
142
+ if attributes.key?(:'starts_at')
143
+ self.starts_at = attributes[:'starts_at']
138
144
  end
139
145
 
140
- if attributes.key?(:'recurrent')
141
- self.recurrent = attributes[:'recurrent']
146
+ if attributes.key?(:'expires_at')
147
+ self.expires_at = attributes[:'expires_at']
142
148
  else
143
- self.recurrent = nil
149
+ self.expires_at = nil
144
150
  end
145
151
 
146
- if attributes.key?(:'type')
147
- self.type = attributes[:'type']
152
+ if attributes.key?(:'can_not_expire')
153
+ self.can_not_expire = attributes[:'can_not_expire']
154
+ end
155
+
156
+ if attributes.key?(:'order_template')
157
+ self.order_template = attributes[:'order_template']
148
158
  else
149
- self.type = nil
159
+ self.order_template = nil
150
160
  end
151
161
  end
152
162
 
@@ -155,28 +165,32 @@ module DigitalFemsa
155
165
  def list_invalid_properties
156
166
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
157
167
  invalid_properties = Array.new
158
- if @allowed_payment_methods.nil?
159
- invalid_properties.push('invalid value for "allowed_payment_methods", allowed_payment_methods cannot be nil.')
160
- end
161
-
162
- if @expires_at.nil?
163
- invalid_properties.push('invalid value for "expires_at", expires_at cannot be nil.')
164
- end
165
-
166
168
  if @name.nil?
167
169
  invalid_properties.push('invalid value for "name", name cannot be nil.')
168
170
  end
169
171
 
170
- if @order_template.nil?
171
- invalid_properties.push('invalid value for "order_template", order_template cannot be nil.')
172
+ if @type.nil?
173
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
172
174
  end
173
175
 
174
176
  if @recurrent.nil?
175
177
  invalid_properties.push('invalid value for "recurrent", recurrent cannot be nil.')
176
178
  end
177
179
 
178
- if @type.nil?
179
- invalid_properties.push('invalid value for "type", type cannot be nil.')
180
+ if @allowed_payment_methods.nil?
181
+ invalid_properties.push('invalid value for "allowed_payment_methods", allowed_payment_methods cannot be nil.')
182
+ end
183
+
184
+ if @needs_shipping_contact.nil?
185
+ invalid_properties.push('invalid value for "needs_shipping_contact", needs_shipping_contact cannot be nil.')
186
+ end
187
+
188
+ if @expires_at.nil?
189
+ invalid_properties.push('invalid value for "expires_at", expires_at cannot be nil.')
190
+ end
191
+
192
+ if @order_template.nil?
193
+ invalid_properties.push('invalid value for "order_template", order_template cannot be nil.')
180
194
  end
181
195
 
182
196
  invalid_properties
@@ -186,12 +200,13 @@ module DigitalFemsa
186
200
  # @return true if the model is valid
187
201
  def valid?
188
202
  warn '[DEPRECATED] the `valid?` method is obsolete'
203
+ return false if @name.nil?
204
+ return false if @type.nil?
205
+ return false if @recurrent.nil?
189
206
  return false if @allowed_payment_methods.nil?
207
+ return false if @needs_shipping_contact.nil?
190
208
  return false if @expires_at.nil?
191
- return false if @name.nil?
192
209
  return false if @order_template.nil?
193
- return false if @recurrent.nil?
194
- return false if @type.nil?
195
210
  true
196
211
  end
197
212
 
@@ -200,15 +215,16 @@ module DigitalFemsa
200
215
  def ==(o)
201
216
  return true if self.equal?(o)
202
217
  self.class == o.class &&
203
- allowed_payment_methods == o.allowed_payment_methods &&
204
- expires_at == o.expires_at &&
205
218
  name == o.name &&
206
- needs_shipping_contact == o.needs_shipping_contact &&
207
- on_demand_enabled == o.on_demand_enabled &&
208
- order_template == o.order_template &&
209
- payments_limit_count == o.payments_limit_count &&
219
+ type == o.type &&
210
220
  recurrent == o.recurrent &&
211
- type == o.type
221
+ payments_limit_count == o.payments_limit_count &&
222
+ allowed_payment_methods == o.allowed_payment_methods &&
223
+ needs_shipping_contact == o.needs_shipping_contact &&
224
+ starts_at == o.starts_at &&
225
+ expires_at == o.expires_at &&
226
+ can_not_expire == o.can_not_expire &&
227
+ order_template == o.order_template
212
228
  end
213
229
 
214
230
  # @see the `==` method
@@ -220,7 +236,7 @@ module DigitalFemsa
220
236
  # Calculates hash code according to all attributes.
221
237
  # @return [Integer] Hash code
222
238
  def hash
223
- [allowed_payment_methods, expires_at, name, needs_shipping_contact, on_demand_enabled, order_template, payments_limit_count, recurrent, type].hash
239
+ [name, type, recurrent, payments_limit_count, allowed_payment_methods, needs_shipping_contact, starts_at, expires_at, can_not_expire, order_template].hash
224
240
  end
225
241
 
226
242
  # Builds the object from hash
@@ -14,17 +14,17 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module DigitalFemsa
17
- # It maintains the attributes with which the order will be created when receiving a new payment.
17
+ # Attributes used to create the order when a new payment is received.
18
18
  class CheckoutOrderTemplate
19
- # It is the currency in which the order will be created. It must be a valid ISO 4217 currency code.
19
+ # ISO 4217 currency code for the order.
20
20
  attr_accessor :currency
21
21
 
22
22
  attr_accessor :customer_info
23
23
 
24
- # They are the products to buy. Each contains the \"unit price\" and \"quantity\" parameters that are used to calculate the total amount of the order.
24
+ # Products to buy. Each contains unit price and quantity used to calculate the order total.
25
25
  attr_accessor :line_items
26
26
 
27
- # 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.
27
+ # Arbitrary key-value data attached to the order for internal use.
28
28
  attr_accessor :metadata
29
29
 
30
30
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module DigitalFemsa
17
- # It is the information of the customer who will be created when receiving a new payment.
17
+ # Customer information used when creating the order.
18
18
  module CheckoutOrderTemplateCustomerInfo
19
19
  class << self
20
20
  # List of class defined in oneOf (OpenAPI v3)
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module DigitalFemsa
17
- # [Checkout](https://developers.femsa.com/v2.1.0/reference/payment-link) details
17
+ # [Checkout](https://developers.digitalfemsa.io/docs/checkout-redireccionado) details
18
18
  class CheckoutRequest
19
19
  # Are the payment methods available for this link
20
20
  attr_accessor :allowed_payment_methods
@@ -32,7 +32,7 @@ module DigitalFemsa
32
32
 
33
33
  attr_accessor :metadata
34
34
 
35
- # Reason for charge
35
+ # Payment link name
36
36
  attr_accessor :name
37
37
 
38
38
  attr_accessor :needs_shipping_contact
@@ -19,14 +19,14 @@ module DigitalFemsa
19
19
 
20
20
  attr_accessor :tax_id
21
21
 
22
+ attr_accessor :name
23
+
22
24
  attr_accessor :email
23
25
 
24
26
  attr_accessor :phone
25
27
 
26
28
  attr_accessor :metadata
27
29
 
28
- attr_accessor :company_name
29
-
30
30
  attr_accessor :id
31
31
 
32
32
  attr_accessor :object
@@ -42,10 +42,10 @@ module DigitalFemsa
42
42
  {
43
43
  :'address' => :'address',
44
44
  :'tax_id' => :'tax_id',
45
+ :'name' => :'name',
45
46
  :'email' => :'email',
46
47
  :'phone' => :'phone',
47
48
  :'metadata' => :'metadata',
48
- :'company_name' => :'company_name',
49
49
  :'id' => :'id',
50
50
  :'object' => :'object',
51
51
  :'created_at' => :'created_at',
@@ -64,10 +64,10 @@ module DigitalFemsa
64
64
  {
65
65
  :'address' => :'CustomerAddress',
66
66
  :'tax_id' => :'String',
67
+ :'name' => :'String',
67
68
  :'email' => :'String',
68
69
  :'phone' => :'String',
69
70
  :'metadata' => :'Hash<String, Object>',
70
- :'company_name' => :'String',
71
71
  :'id' => :'String',
72
72
  :'object' => :'String',
73
73
  :'created_at' => :'Integer',
@@ -114,6 +114,10 @@ module DigitalFemsa
114
114
  self.tax_id = attributes[:'tax_id']
115
115
  end
116
116
 
117
+ if attributes.key?(:'name')
118
+ self.name = attributes[:'name']
119
+ end
120
+
117
121
  if attributes.key?(:'email')
118
122
  self.email = attributes[:'email']
119
123
  end
@@ -128,10 +132,6 @@ module DigitalFemsa
128
132
  end
129
133
  end
130
134
 
131
- if attributes.key?(:'company_name')
132
- self.company_name = attributes[:'company_name']
133
- end
134
-
135
135
  if attributes.key?(:'id')
136
136
  self.id = attributes[:'id']
137
137
  else
@@ -201,10 +201,10 @@ module DigitalFemsa
201
201
  self.class == o.class &&
202
202
  address == o.address &&
203
203
  tax_id == o.tax_id &&
204
+ name == o.name &&
204
205
  email == o.email &&
205
206
  phone == o.phone &&
206
207
  metadata == o.metadata &&
207
- company_name == o.company_name &&
208
208
  id == o.id &&
209
209
  object == o.object &&
210
210
  created_at == o.created_at &&
@@ -221,7 +221,7 @@ module DigitalFemsa
221
221
  # Calculates hash code according to all attributes.
222
222
  # @return [Integer] Hash code
223
223
  def hash
224
- [address, tax_id, email, phone, metadata, company_name, id, object, created_at, parent_id, default].hash
224
+ [address, tax_id, name, email, phone, metadata, id, object, created_at, parent_id, default].hash
225
225
  end
226
226
 
227
227
  # Builds the object from hash