conekta 7.0.0 → 7.0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a579bb9da590cfc9dc726b60b9896b61c0acb494f26d8f24d561a149be00b120
4
- data.tar.gz: 04e148f60aadefd2eb727bec0a4650c178127d8f4b177b5cb8631c938b002b84
3
+ metadata.gz: de6702f50f09c6c63f9540a55beb1d5fc6c86aed79da98109d5efd087d513423
4
+ data.tar.gz: 71c2fa0b1fe784798e32647578b814b1fa79cf24b34d2d88ecafaede276b2377
5
5
  SHA512:
6
- metadata.gz: 770700fb1a2f8def17baff00b4c9baabe8a5b0010384f3ec740537f91e8049080ba8107792d54616fe097e91426c0b7cc24744604ffe907d95ee75954034a11c
7
- data.tar.gz: 9653891eaeb5f3a90ec6bbfd0ffece3be65142acc0e74d36446dcc60a35d9e6afbddb1413651b490d6cc0f3c052a789180e9fe72a9ccee8c688d1d7f97469e80
6
+ metadata.gz: b83cabad45e6759eab5a63a6edc7076de560ab67e78f0e0c2052c90a0be2cc6ee77bb352dbe106028b31e2438cde736a6f6102a7a663ee9a356c3ea2417a98c5
7
+ data.tar.gz: 204fd3a81bcc5612a226ced8c4fc0a19ed433a0c48fc0a8cf9912e2835f78177cfac4ee26d95e13d9e1ecf45e3bd007b4a0652f8e18bdf06df5cc19fd33a6136
data/README.md CHANGED
@@ -7,8 +7,8 @@ Conekta sdk
7
7
  This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
8
8
 
9
9
  - API version: 2.2.0
10
- - Package version: 7.0.0
11
- - Build date: 2025-04-10T21:18:19.648930512Z[Etc/UTC]
10
+ - Package version: 7.0.1
11
+ - Build date: 2025-04-28T20:56:45.514316928Z[Etc/UTC]
12
12
  - Generator version: 7.5.0
13
13
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
14
14
  For more information, please visit [https://github.com/conekta/openapi/issues](https://github.com/conekta/openapi/issues)
@@ -26,16 +26,16 @@ gem build conekta.gemspec
26
26
  Then either install the gem locally:
27
27
 
28
28
  ```shell
29
- gem install ./conekta-7.0.0.gem
29
+ gem install ./conekta-7.0.1.gem
30
30
  ```
31
31
 
32
- (for development, run `gem install --dev ./conekta-7.0.0.gem` to install the development dependencies)
32
+ (for development, run `gem install --dev ./conekta-7.0.1.gem` to install the development dependencies)
33
33
 
34
34
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
35
35
 
36
36
  Finally add this to the Gemfile:
37
37
 
38
- gem 'conekta', '~> 7.0.0'
38
+ gem 'conekta', '~> 7.0.1'
39
39
 
40
40
  ### Install from Git
41
41
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 7.0.0
1
+ 7.0.1
data/config-ruby.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "gemAuthor": "Conekta",
4
4
  "gemName" : "conekta",
5
5
  "gemLicense": "MIT",
6
- "gemVersion": "7.0.0",
6
+ "gemVersion": "7.0.1",
7
7
  "hideGenerationTimestamp": false,
8
8
  "moduleName": "Conekta",
9
9
  "gemSummary" : "This library provides https://api.conekta.io operations",
@@ -7,6 +7,7 @@
7
7
  | **currency** | **String** | It is the currency in which the order will be created. It must be a valid ISO 4217 currency code. | |
8
8
  | **customer_info** | [**CheckoutOrderTemplateCustomerInfo**](CheckoutOrderTemplateCustomerInfo.md) | | [optional] |
9
9
  | **line_items** | [**Array<Product>**](Product.md) | 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. | |
10
+ | **plan_ids** | **Array<String>** | It is a list of plan IDs that will be associated with the order. | [optional] |
10
11
  | **metadata** | **Hash<String, Object>** | 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] |
11
12
 
12
13
  ## Example
@@ -18,6 +19,7 @@ instance = Conekta::CheckoutOrderTemplate.new(
18
19
  currency: MXN,
19
20
  customer_info: null,
20
21
  line_items: null,
22
+ plan_ids: ["plan_123","plan_456"],
21
23
  metadata: {"key":"value"}
22
24
  )
23
25
  ```
@@ -4,7 +4,8 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **allowed_payment_methods** | **Array<String>** | Are the payment methods available for this link | |
7
+ | **allowed_payment_methods** | **Array<String>** | Are the payment methods available for this link. For subscriptions, only 'card' is allowed due to the recurring nature of the payments. | |
8
+ | **plan_ids** | **Array<String>** | List of plan IDs that will be available for subscription. This field is required for subscription payments but optional for other types of payments. |
8
9
  | **expires_at** | **Integer** | Unix timestamp of checkout expiration | [optional] |
9
10
  | **failure_url** | **String** | Redirection url back to the site in case of failed payment, applies only to HostedPayment. | [optional] |
10
11
  | **monthly_installments_enabled** | **Boolean** | | [optional] |
@@ -23,6 +24,7 @@ require 'conekta'
23
24
 
24
25
  instance = Conekta::CheckoutRequest.new(
25
26
  allowed_payment_methods: ["cash","card","bank_transfer","bnpl"],
27
+ plan_ids: ["plan_123","plan_456"],
26
28
  expires_at: null,
27
29
  failure_url: null,
28
30
  monthly_installments_enabled: false,
@@ -5,6 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **allowed_payment_methods** | **Array<String>** | Are the payment methods available for this link | [optional] |
8
+ | **plan_ids** | **Array<String>** | List of plan IDs that are available for subscription | [optional] |
8
9
  | **can_not_expire** | **Boolean** | | [optional] |
9
10
  | **emails_sent** | **Integer** | | [optional] |
10
11
  | **exclude_card_networks** | **Array<Object>** | | [optional] |
@@ -37,6 +38,7 @@ require 'conekta'
37
38
 
38
39
  instance = Conekta::CheckoutResponse.new(
39
40
  allowed_payment_methods: ["cash","card","bank_transfer","bnpl"],
41
+ plan_ids: ["plan_123","plan_456"],
40
42
  can_not_expire: false,
41
43
  emails_sent: 0,
42
44
  exclude_card_networks: null,
@@ -24,6 +24,9 @@ module Conekta
24
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.
25
25
  attr_accessor :line_items
26
26
 
27
+ # It is a list of plan IDs that will be associated with the order.
28
+ attr_accessor :plan_ids
29
+
27
30
  # 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.
28
31
  attr_accessor :metadata
29
32
 
@@ -33,6 +36,7 @@ module Conekta
33
36
  :'currency' => :'currency',
34
37
  :'customer_info' => :'customer_info',
35
38
  :'line_items' => :'line_items',
39
+ :'plan_ids' => :'plan_ids',
36
40
  :'metadata' => :'metadata'
37
41
  }
38
42
  end
@@ -48,6 +52,7 @@ module Conekta
48
52
  :'currency' => :'String',
49
53
  :'customer_info' => :'CheckoutOrderTemplateCustomerInfo',
50
54
  :'line_items' => :'Array<Product>',
55
+ :'plan_ids' => :'Array<String>',
51
56
  :'metadata' => :'Hash<String, Object>'
52
57
  }
53
58
  end
@@ -91,6 +96,12 @@ module Conekta
91
96
  self.line_items = nil
92
97
  end
93
98
 
99
+ if attributes.key?(:'plan_ids')
100
+ if (value = attributes[:'plan_ids']).is_a?(Array)
101
+ self.plan_ids = value
102
+ end
103
+ end
104
+
94
105
  if attributes.key?(:'metadata')
95
106
  if (value = attributes[:'metadata']).is_a?(Hash)
96
107
  self.metadata = value
@@ -169,6 +180,7 @@ module Conekta
169
180
  currency == o.currency &&
170
181
  customer_info == o.customer_info &&
171
182
  line_items == o.line_items &&
183
+ plan_ids == o.plan_ids &&
172
184
  metadata == o.metadata
173
185
  end
174
186
 
@@ -181,7 +193,7 @@ module Conekta
181
193
  # Calculates hash code according to all attributes.
182
194
  # @return [Integer] Hash code
183
195
  def hash
184
- [currency, customer_info, line_items, metadata].hash
196
+ [currency, customer_info, line_items, plan_ids, metadata].hash
185
197
  end
186
198
 
187
199
  # Builds the object from hash
@@ -16,9 +16,12 @@ require 'time'
16
16
  module Conekta
17
17
  # [Checkout](https://developers.conekta.com/v2.2.0/reference/payment-link) details
18
18
  class CheckoutRequest
19
- # Are the payment methods available for this link
19
+ # Are the payment methods available for this link. For subscriptions, only 'card' is allowed due to the recurring nature of the payments.
20
20
  attr_accessor :allowed_payment_methods
21
21
 
22
+ # List of plan IDs that will be available for subscription. This field is required for subscription payments.
23
+ attr_accessor :plan_ids
24
+
22
25
  # Unix timestamp of checkout expiration
23
26
  attr_accessor :expires_at
24
27
 
@@ -46,10 +49,33 @@ module Conekta
46
49
  # This field represents the type of checkout
47
50
  attr_accessor :type
48
51
 
52
+ class EnumAttributeValidator
53
+ attr_reader :datatype
54
+ attr_reader :allowable_values
55
+
56
+ def initialize(datatype, allowable_values)
57
+ @allowable_values = allowable_values.map do |value|
58
+ case datatype.to_s
59
+ when /Integer/i
60
+ value.to_i
61
+ when /Float/i
62
+ value.to_f
63
+ else
64
+ value
65
+ end
66
+ end
67
+ end
68
+
69
+ def valid?(value)
70
+ !value || allowable_values.include?(value)
71
+ end
72
+ end
73
+
49
74
  # Attribute mapping from ruby-style variable name to JSON key.
50
75
  def self.attribute_map
51
76
  {
52
77
  :'allowed_payment_methods' => :'allowed_payment_methods',
78
+ :'plan_ids' => :'plan_ids',
53
79
  :'expires_at' => :'expires_at',
54
80
  :'failure_url' => :'failure_url',
55
81
  :'monthly_installments_enabled' => :'monthly_installments_enabled',
@@ -72,6 +98,7 @@ module Conekta
72
98
  def self.openapi_types
73
99
  {
74
100
  :'allowed_payment_methods' => :'Array<String>',
101
+ :'plan_ids' => :'Array<String>',
75
102
  :'expires_at' => :'Integer',
76
103
  :'failure_url' => :'String',
77
104
  :'monthly_installments_enabled' => :'Boolean',
@@ -114,6 +141,12 @@ module Conekta
114
141
  self.allowed_payment_methods = nil
115
142
  end
116
143
 
144
+ if attributes.key?(:'plan_ids')
145
+ if (value = attributes[:'plan_ids']).is_a?(Array)
146
+ self.plan_ids = value
147
+ end
148
+ end
149
+
117
150
  if attributes.key?(:'expires_at')
118
151
  self.expires_at = attributes[:'expires_at']
119
152
  end
@@ -183,6 +216,7 @@ module Conekta
183
216
  return true if self.equal?(o)
184
217
  self.class == o.class &&
185
218
  allowed_payment_methods == o.allowed_payment_methods &&
219
+ plan_ids == o.plan_ids &&
186
220
  expires_at == o.expires_at &&
187
221
  failure_url == o.failure_url &&
188
222
  monthly_installments_enabled == o.monthly_installments_enabled &&
@@ -204,7 +238,7 @@ module Conekta
204
238
  # Calculates hash code according to all attributes.
205
239
  # @return [Integer] Hash code
206
240
  def hash
207
- [allowed_payment_methods, expires_at, failure_url, monthly_installments_enabled, monthly_installments_options, max_failed_retries, name, on_demand_enabled, redirection_time, success_url, type].hash
241
+ [allowed_payment_methods, plan_ids, expires_at, failure_url, monthly_installments_enabled, monthly_installments_options, max_failed_retries, name, on_demand_enabled, redirection_time, success_url, type].hash
208
242
  end
209
243
 
210
244
  # Builds the object from hash
@@ -19,6 +19,9 @@ module Conekta
19
19
  # Are the payment methods available for this link
20
20
  attr_accessor :allowed_payment_methods
21
21
 
22
+ # List of plan IDs that are available for subscription
23
+ attr_accessor :plan_ids
24
+
22
25
  attr_accessor :can_not_expire
23
26
 
24
27
  attr_accessor :emails_sent
@@ -72,6 +75,7 @@ module Conekta
72
75
  def self.attribute_map
73
76
  {
74
77
  :'allowed_payment_methods' => :'allowed_payment_methods',
78
+ :'plan_ids' => :'plan_ids',
75
79
  :'can_not_expire' => :'can_not_expire',
76
80
  :'emails_sent' => :'emails_sent',
77
81
  :'exclude_card_networks' => :'exclude_card_networks',
@@ -108,6 +112,7 @@ module Conekta
108
112
  def self.openapi_types
109
113
  {
110
114
  :'allowed_payment_methods' => :'Array<String>',
115
+ :'plan_ids' => :'Array<String>',
111
116
  :'can_not_expire' => :'Boolean',
112
117
  :'emails_sent' => :'Integer',
113
118
  :'exclude_card_networks' => :'Array<Object>',
@@ -163,6 +168,12 @@ module Conekta
163
168
  end
164
169
  end
165
170
 
171
+ if attributes.key?(:'plan_ids')
172
+ if (value = attributes[:'plan_ids']).is_a?(Array)
173
+ self.plan_ids = value
174
+ end
175
+ end
176
+
166
177
  if attributes.key?(:'can_not_expire')
167
178
  self.can_not_expire = attributes[:'can_not_expire']
168
179
  end
@@ -315,6 +326,7 @@ module Conekta
315
326
  return true if self.equal?(o)
316
327
  self.class == o.class &&
317
328
  allowed_payment_methods == o.allowed_payment_methods &&
329
+ plan_ids == o.plan_ids &&
318
330
  can_not_expire == o.can_not_expire &&
319
331
  emails_sent == o.emails_sent &&
320
332
  exclude_card_networks == o.exclude_card_networks &&
@@ -350,7 +362,7 @@ module Conekta
350
362
  # Calculates hash code according to all attributes.
351
363
  # @return [Integer] Hash code
352
364
  def hash
353
- [allowed_payment_methods, can_not_expire, emails_sent, exclude_card_networks, expires_at, failure_url, force_3ds_flow, id, livemode, metadata, monthly_installments_enabled, monthly_installments_options, name, needs_shipping_contact, object, paid_payments_count, payments_limit_count, recurrent, slug, sms_sent, starts_at, status, success_url, type, url].hash
365
+ [allowed_payment_methods, plan_ids, can_not_expire, emails_sent, exclude_card_networks, expires_at, failure_url, force_3ds_flow, id, livemode, metadata, monthly_installments_enabled, monthly_installments_options, name, needs_shipping_contact, object, paid_payments_count, payments_limit_count, recurrent, slug, sms_sent, starts_at, status, success_url, type, url].hash
354
366
  end
355
367
 
356
368
  # Builds the object from hash
@@ -11,5 +11,5 @@ Generator version: 7.5.0
11
11
  =end
12
12
 
13
13
  module Conekta
14
- VERSION = '7.0.0'
14
+ VERSION = '7.0.1'
15
15
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: conekta
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.0
4
+ version: 7.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Conekta
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-04-21 00:00:00.000000000 Z
11
+ date: 2025-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -616,30 +616,30 @@ signing_key:
616
616
  specification_version: 4
617
617
  summary: This library provides https://api.conekta.io operations
618
618
  test_files:
619
- - spec/api/transactions_api_spec.rb
620
- - spec/api/api_keys_api_spec.rb
621
- - spec/api/shipping_contacts_api_spec.rb
622
- - spec/api/orders_api_spec.rb
623
- - spec/api/webhook_keys_api_spec.rb
624
- - spec/api/payment_methods_api_spec.rb
625
- - spec/api/shippings_api_spec.rb
626
- - spec/api/transfers_api_spec.rb
627
- - spec/api/events_api_spec.rb
628
- - spec/api/charges_api_spec.rb
629
619
  - spec/api/payment_link_api_spec.rb
630
620
  - spec/api/antifraud_api_spec.rb
631
- - spec/api/discounts_api_spec.rb
632
- - spec/api/payout_orders_api_spec.rb
633
- - spec/api/subscriptions_api_spec.rb
634
- - spec/api/customers_api_spec.rb
635
- - spec/api/plans_api_spec.rb
636
- - spec/api/taxes_api_spec.rb
637
621
  - spec/api/webhooks_api_spec.rb
638
- - spec/api/tokens_api_spec.rb
639
- - spec/api/products_api_spec.rb
622
+ - spec/api/taxes_api_spec.rb
623
+ - spec/api/customers_api_spec.rb
640
624
  - spec/api/balances_api_spec.rb
641
625
  - spec/api/logs_api_spec.rb
626
+ - spec/api/payment_methods_api_spec.rb
627
+ - spec/api/payout_orders_api_spec.rb
628
+ - spec/api/shipping_contacts_api_spec.rb
629
+ - spec/api/discounts_api_spec.rb
630
+ - spec/api/webhook_keys_api_spec.rb
631
+ - spec/api/products_api_spec.rb
632
+ - spec/api/orders_api_spec.rb
633
+ - spec/api/transfers_api_spec.rb
634
+ - spec/api/plans_api_spec.rb
635
+ - spec/api/transactions_api_spec.rb
636
+ - spec/api/subscriptions_api_spec.rb
637
+ - spec/api/tokens_api_spec.rb
638
+ - spec/api/events_api_spec.rb
642
639
  - spec/api/companies_api_spec.rb
640
+ - spec/api/charges_api_spec.rb
641
+ - spec/api/shippings_api_spec.rb
642
+ - spec/api/api_keys_api_spec.rb
643
643
  - spec/api_client_spec.rb
644
644
  - spec/configuration_spec.rb
645
645
  - spec/spec_helper.rb