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
@@ -15,18 +15,47 @@ require 'time'
15
15
 
16
16
  module DigitalFemsa
17
17
  class OrderRefundRequest
18
+ # Amount to refund. If not provided, the API refunds the refundable amount of the selected charge.
18
19
  attr_accessor :amount
19
20
 
20
- attr_accessor :expires_at
21
+ # Charge ID to refund. If not provided, the API selects a refundable charge from the order.
22
+ attr_accessor :charge_id
21
23
 
24
+ # Refund reason. If not provided, the API uses a default reason.
22
25
  attr_accessor :reason
23
26
 
27
+ # Expiration timestamp for cash refunds (must be within the allowed range configured by the API).
28
+ attr_accessor :expires_at
29
+
30
+ class EnumAttributeValidator
31
+ attr_reader :datatype
32
+ attr_reader :allowable_values
33
+
34
+ def initialize(datatype, allowable_values)
35
+ @allowable_values = allowable_values.map do |value|
36
+ case datatype.to_s
37
+ when /Integer/i
38
+ value.to_i
39
+ when /Float/i
40
+ value.to_f
41
+ else
42
+ value
43
+ end
44
+ end
45
+ end
46
+
47
+ def valid?(value)
48
+ !value || allowable_values.include?(value)
49
+ end
50
+ end
51
+
24
52
  # Attribute mapping from ruby-style variable name to JSON key.
25
53
  def self.attribute_map
26
54
  {
27
55
  :'amount' => :'amount',
28
- :'expires_at' => :'expires_at',
29
- :'reason' => :'reason'
56
+ :'charge_id' => :'charge_id',
57
+ :'reason' => :'reason',
58
+ :'expires_at' => :'expires_at'
30
59
  }
31
60
  end
32
61
 
@@ -39,15 +68,17 @@ module DigitalFemsa
39
68
  def self.openapi_types
40
69
  {
41
70
  :'amount' => :'Integer',
42
- :'expires_at' => :'Integer',
43
- :'reason' => :'String'
71
+ :'charge_id' => :'String',
72
+ :'reason' => :'String',
73
+ :'expires_at' => :'Integer'
44
74
  }
45
75
  end
46
76
 
47
77
  # List of attributes with nullable: true
48
78
  def self.openapi_nullable
49
79
  Set.new([
50
- :'expires_at',
80
+ :'charge_id',
81
+ :'expires_at'
51
82
  ])
52
83
  end
53
84
 
@@ -72,8 +103,8 @@ module DigitalFemsa
72
103
  self.amount = nil
73
104
  end
74
105
 
75
- if attributes.key?(:'expires_at')
76
- self.expires_at = attributes[:'expires_at']
106
+ if attributes.key?(:'charge_id')
107
+ self.charge_id = attributes[:'charge_id']
77
108
  end
78
109
 
79
110
  if attributes.key?(:'reason')
@@ -81,6 +112,10 @@ module DigitalFemsa
81
112
  else
82
113
  self.reason = nil
83
114
  end
115
+
116
+ if attributes.key?(:'expires_at')
117
+ self.expires_at = attributes[:'expires_at']
118
+ end
84
119
  end
85
120
 
86
121
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -105,17 +140,30 @@ module DigitalFemsa
105
140
  warn '[DEPRECATED] the `valid?` method is obsolete'
106
141
  return false if @amount.nil?
107
142
  return false if @reason.nil?
143
+ reason_validator = EnumAttributeValidator.new('String', ["requested_by_client", "cannot_be_fulfilled", "duplicated_transaction", "suspected_fraud", "other"])
144
+ return false unless reason_validator.valid?(@reason)
108
145
  true
109
146
  end
110
147
 
148
+ # Custom attribute writer method checking allowed values (enum).
149
+ # @param [Object] reason Object to be assigned
150
+ def reason=(reason)
151
+ validator = EnumAttributeValidator.new('String', ["requested_by_client", "cannot_be_fulfilled", "duplicated_transaction", "suspected_fraud", "other"])
152
+ unless validator.valid?(reason)
153
+ fail ArgumentError, "invalid value for \"reason\", must be one of #{validator.allowable_values}."
154
+ end
155
+ @reason = reason
156
+ end
157
+
111
158
  # Checks equality by comparing each attribute.
112
159
  # @param [Object] Object to be compared
113
160
  def ==(o)
114
161
  return true if self.equal?(o)
115
162
  self.class == o.class &&
116
163
  amount == o.amount &&
117
- expires_at == o.expires_at &&
118
- reason == o.reason
164
+ charge_id == o.charge_id &&
165
+ reason == o.reason &&
166
+ expires_at == o.expires_at
119
167
  end
120
168
 
121
169
  # @see the `==` method
@@ -127,7 +175,7 @@ module DigitalFemsa
127
175
  # Calculates hash code according to all attributes.
128
176
  # @return [Integer] Hash code
129
177
  def hash
130
- [amount, expires_at, reason].hash
178
+ [amount, charge_id, reason, expires_at].hash
131
179
  end
132
180
 
133
181
  # Builds the object from hash
@@ -16,61 +16,57 @@ require 'time'
16
16
  module DigitalFemsa
17
17
  # a order
18
18
  class OrderRequest
19
- # List of [charges](https://developers.femsa.com/v2.1.0/reference/orderscreatecharge) that are applied to the order
20
- attr_accessor :charges
21
-
22
- attr_accessor :checkout
23
-
24
- # 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)
19
+ # Currency with which the payment will be made.
25
20
  attr_accessor :currency
26
21
 
27
22
  attr_accessor :customer_info
28
23
 
29
- # 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.
30
- attr_accessor :discount_lines
24
+ # List of [products](https://developers.digitalfemsa.io/reference/orderscreateproduct) that are sold in the order. You must have at least one product.
25
+ attr_accessor :line_items
31
26
 
32
- attr_accessor :fiscal_entity
27
+ # List of [charges](https://developers.digitalfemsa.io/reference/orderscreatecharge) that are applied to the order
28
+ attr_accessor :charges
33
29
 
34
- # 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.
35
- attr_accessor :line_items
30
+ attr_accessor :checkout
36
31
 
37
- # Metadata associated with the order
38
- attr_accessor :metadata
32
+ # List of [discounts](https://developers.digitalfemsa.io/reference/orderscreatediscountline) that are applied to the order. You must have at least one discount.
33
+ attr_accessor :discount_lines
34
+
35
+ # List of [taxes](https://developers.digitalfemsa.io/reference/orderscreatetaxes) that are applied to the order.
36
+ attr_accessor :tax_lines
39
37
 
40
38
  # Allows you to fill out the shipping information at checkout
41
39
  attr_accessor :needs_shipping_contact
42
40
 
43
- # Indicates the processing mode for the order, either ecommerce, recurrent or validation.
44
- attr_accessor :processing_mode
45
-
46
- # Indicates the redirection callback upon completion of the 3DS2 flow.
47
- attr_accessor :return_url
48
-
49
41
  attr_accessor :shipping_contact
50
42
 
51
- # List of [shipping costs](https://developers.femsa.com/v2.1.0/reference/orderscreateshipping). If the online store offers digital products.
43
+ # List of [shipping costs](https://developers.digitalfemsa.io/reference/orderscreateshipping). If the online store offers digital products.
52
44
  attr_accessor :shipping_lines
53
45
 
54
- # List of [taxes](https://developers.femsa.com/v2.1.0/reference/orderscreatetaxes) that are applied to the order.
55
- attr_accessor :tax_lines
46
+ attr_accessor :fiscal_entity
47
+
48
+ # Indicates the processing mode for the order, either ecommerce, recurrent or validation.
49
+ attr_accessor :processing_mode
50
+
51
+ # 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.
52
+ attr_accessor :metadata
56
53
 
57
54
  # Attribute mapping from ruby-style variable name to JSON key.
58
55
  def self.attribute_map
59
56
  {
60
- :'charges' => :'charges',
61
- :'checkout' => :'checkout',
62
57
  :'currency' => :'currency',
63
58
  :'customer_info' => :'customer_info',
64
- :'discount_lines' => :'discount_lines',
65
- :'fiscal_entity' => :'fiscal_entity',
66
59
  :'line_items' => :'line_items',
67
- :'metadata' => :'metadata',
60
+ :'charges' => :'charges',
61
+ :'checkout' => :'checkout',
62
+ :'discount_lines' => :'discount_lines',
63
+ :'tax_lines' => :'tax_lines',
68
64
  :'needs_shipping_contact' => :'needs_shipping_contact',
69
- :'processing_mode' => :'processing_mode',
70
- :'return_url' => :'return_url',
71
65
  :'shipping_contact' => :'shipping_contact',
72
66
  :'shipping_lines' => :'shipping_lines',
73
- :'tax_lines' => :'tax_lines'
67
+ :'fiscal_entity' => :'fiscal_entity',
68
+ :'processing_mode' => :'processing_mode',
69
+ :'metadata' => :'metadata'
74
70
  }
75
71
  end
76
72
 
@@ -82,20 +78,19 @@ module DigitalFemsa
82
78
  # Attribute type mapping.
83
79
  def self.openapi_types
84
80
  {
85
- :'charges' => :'Array<ChargeRequest>',
86
- :'checkout' => :'CheckoutRequest',
87
81
  :'currency' => :'String',
88
82
  :'customer_info' => :'OrderRequestCustomerInfo',
89
- :'discount_lines' => :'Array<OrderDiscountLinesRequest>',
90
- :'fiscal_entity' => :'OrderFiscalEntityRequest',
91
83
  :'line_items' => :'Array<Product>',
92
- :'metadata' => :'Hash<String, Object>',
84
+ :'charges' => :'Array<ChargeRequest>',
85
+ :'checkout' => :'CheckoutRequest',
86
+ :'discount_lines' => :'Array<OrderDiscountLinesRequest>',
87
+ :'tax_lines' => :'Array<OrderTaxRequest>',
93
88
  :'needs_shipping_contact' => :'Boolean',
94
- :'processing_mode' => :'String',
95
- :'return_url' => :'String',
96
89
  :'shipping_contact' => :'CustomerShippingContacts',
97
90
  :'shipping_lines' => :'Array<ShippingRequest>',
98
- :'tax_lines' => :'Array<OrderTaxRequest>'
91
+ :'fiscal_entity' => :'OrderFiscalEntityRequest',
92
+ :'processing_mode' => :'String',
93
+ :'metadata' => :'Hash<String, Object>'
99
94
  }
100
95
  end
101
96
 
@@ -120,16 +115,6 @@ module DigitalFemsa
120
115
  h[k.to_sym] = v
121
116
  }
122
117
 
123
- if attributes.key?(:'charges')
124
- if (value = attributes[:'charges']).is_a?(Array)
125
- self.charges = value
126
- end
127
- end
128
-
129
- if attributes.key?(:'checkout')
130
- self.checkout = attributes[:'checkout']
131
- end
132
-
133
118
  if attributes.key?(:'currency')
134
119
  self.currency = attributes[:'currency']
135
120
  else
@@ -142,16 +127,6 @@ module DigitalFemsa
142
127
  self.customer_info = nil
143
128
  end
144
129
 
145
- if attributes.key?(:'discount_lines')
146
- if (value = attributes[:'discount_lines']).is_a?(Array)
147
- self.discount_lines = value
148
- end
149
- end
150
-
151
- if attributes.key?(:'fiscal_entity')
152
- self.fiscal_entity = attributes[:'fiscal_entity']
153
- end
154
-
155
130
  if attributes.key?(:'line_items')
156
131
  if (value = attributes[:'line_items']).is_a?(Array)
157
132
  self.line_items = value
@@ -160,22 +135,30 @@ module DigitalFemsa
160
135
  self.line_items = nil
161
136
  end
162
137
 
163
- if attributes.key?(:'metadata')
164
- if (value = attributes[:'metadata']).is_a?(Hash)
165
- self.metadata = value
138
+ if attributes.key?(:'charges')
139
+ if (value = attributes[:'charges']).is_a?(Array)
140
+ self.charges = value
166
141
  end
167
142
  end
168
143
 
169
- if attributes.key?(:'needs_shipping_contact')
170
- self.needs_shipping_contact = attributes[:'needs_shipping_contact']
144
+ if attributes.key?(:'checkout')
145
+ self.checkout = attributes[:'checkout']
171
146
  end
172
147
 
173
- if attributes.key?(:'processing_mode')
174
- self.processing_mode = attributes[:'processing_mode']
148
+ if attributes.key?(:'discount_lines')
149
+ if (value = attributes[:'discount_lines']).is_a?(Array)
150
+ self.discount_lines = value
151
+ end
152
+ end
153
+
154
+ if attributes.key?(:'tax_lines')
155
+ if (value = attributes[:'tax_lines']).is_a?(Array)
156
+ self.tax_lines = value
157
+ end
175
158
  end
176
159
 
177
- if attributes.key?(:'return_url')
178
- self.return_url = attributes[:'return_url']
160
+ if attributes.key?(:'needs_shipping_contact')
161
+ self.needs_shipping_contact = attributes[:'needs_shipping_contact']
179
162
  end
180
163
 
181
164
  if attributes.key?(:'shipping_contact')
@@ -188,9 +171,17 @@ module DigitalFemsa
188
171
  end
189
172
  end
190
173
 
191
- if attributes.key?(:'tax_lines')
192
- if (value = attributes[:'tax_lines']).is_a?(Array)
193
- self.tax_lines = value
174
+ if attributes.key?(:'fiscal_entity')
175
+ self.fiscal_entity = attributes[:'fiscal_entity']
176
+ end
177
+
178
+ if attributes.key?(:'processing_mode')
179
+ self.processing_mode = attributes[:'processing_mode']
180
+ end
181
+
182
+ if attributes.key?(:'metadata')
183
+ if (value = attributes[:'metadata']).is_a?(Hash)
184
+ self.metadata = value
194
185
  end
195
186
  end
196
187
  end
@@ -268,20 +259,19 @@ module DigitalFemsa
268
259
  def ==(o)
269
260
  return true if self.equal?(o)
270
261
  self.class == o.class &&
271
- charges == o.charges &&
272
- checkout == o.checkout &&
273
262
  currency == o.currency &&
274
263
  customer_info == o.customer_info &&
275
- discount_lines == o.discount_lines &&
276
- fiscal_entity == o.fiscal_entity &&
277
264
  line_items == o.line_items &&
278
- metadata == o.metadata &&
265
+ charges == o.charges &&
266
+ checkout == o.checkout &&
267
+ discount_lines == o.discount_lines &&
268
+ tax_lines == o.tax_lines &&
279
269
  needs_shipping_contact == o.needs_shipping_contact &&
280
- processing_mode == o.processing_mode &&
281
- return_url == o.return_url &&
282
270
  shipping_contact == o.shipping_contact &&
283
271
  shipping_lines == o.shipping_lines &&
284
- tax_lines == o.tax_lines
272
+ fiscal_entity == o.fiscal_entity &&
273
+ processing_mode == o.processing_mode &&
274
+ metadata == o.metadata
285
275
  end
286
276
 
287
277
  # @see the `==` method
@@ -293,7 +283,7 @@ module DigitalFemsa
293
283
  # Calculates hash code according to all attributes.
294
284
  # @return [Integer] Hash code
295
285
  def hash
296
- [charges, checkout, currency, customer_info, discount_lines, fiscal_entity, line_items, metadata, needs_shipping_contact, processing_mode, return_url, shipping_contact, shipping_lines, tax_lines].hash
286
+ [currency, customer_info, line_items, charges, checkout, discount_lines, tax_lines, needs_shipping_contact, shipping_contact, shipping_lines, fiscal_entity, processing_mode, metadata].hash
297
287
  end
298
288
 
299
289
  # Builds the object from hash