square_connect 2.3.0.154 → 2.3.1.161
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +6 -0
- data/README.md +1 -1
- data/docs/ChargeRequest.md +1 -0
- data/docs/OrdersApi.md +1 -1
- data/lib/square_connect/api/orders_api.rb +2 -2
- data/lib/square_connect/api_client.rb +1 -1
- data/lib/square_connect/models/charge_request.rb +30 -4
- data/lib/square_connect/version.rb +1 -1
- data/travis-ci/accounts.enc +0 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f2c109aad77f676e6851aea671b016032962b83
|
4
|
+
data.tar.gz: b63de96f405ec2ff99faa709c8d737e96b19ccdc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f31569e0b0e5c61d54e52f46e622c0d3e1c42f1ab674c0858b5bbd29c2647121fe41a3748945c999b6a38f0a6280e3ff270aebd4fa8782629c0feacbac9c0a0d
|
7
|
+
data.tar.gz: 6db8b50c37eb94bcf5234ab45c350e02efb4db1a6631e19d49ceea6586c552b7c3d92e6d8c399f65aa978486a48e33e2b447a208f642147fbc0719f0413fb22b
|
data/CHANGES.md
CHANGED
data/README.md
CHANGED
@@ -10,7 +10,7 @@ for the specification and template files we used to generate this.
|
|
10
10
|
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
11
11
|
|
12
12
|
- API version: 2.0
|
13
|
-
- Package version: 2.3.
|
13
|
+
- Package version: 2.3.1
|
14
14
|
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
15
15
|
|
16
16
|
For more information, please visit [https://squareup.com/developers](https://squareup.com/developers)
|
data/docs/ChargeRequest.md
CHANGED
@@ -18,5 +18,6 @@ Name | Type | Description | Notes
|
|
18
18
|
**billing_address** | [**Address**](Address.md) | The buyer's billing address. This value is optional, but this transaction is ineligible for chargeback protection if neither this parameter nor `shipping_address` is provided. | [optional]
|
19
19
|
**shipping_address** | [**Address**](Address.md) | The buyer's shipping address, if available. This value is optional, but this transaction is ineligible for chargeback protection if neither this parameter nor `billing_address` is provided. | [optional]
|
20
20
|
**buyer_email_address** | **String** | The buyer's email address, if available. This value is optional, but this transaction is ineligible for chargeback protection if it is not provided. | [optional]
|
21
|
+
**order_id** | **String** | The ID of the order to associate with this transaction. If you provide this value, the `amount_money` value of your request must __exactly match__ the `total_money` value of the order's `order_amounts` field. | [optional]
|
21
22
|
|
22
23
|
|
data/docs/OrdersApi.md
CHANGED
@@ -68,7 +68,7 @@ Name | Type | Description | Notes
|
|
68
68
|
|
69
69
|
CreateOrder
|
70
70
|
|
71
|
-
Creates an [Order](#type-order) that can then be referenced as `order_id` in a request to the [Charge](#endpoint-charge) endpoint. Orders specify products for purchase, along with discounts, taxes, and other settings to apply to the purchase. To associate a created order with a request to the Charge endpoint, provide the order's `id` in the `order_id` field of your request. You cannot modify an order after you create it. If you need to modify an order, instead create a new order with modified details. To learn more about the Orders API, see the [Orders API Overview](https://docs.connect.squareup.com/articles/orders-overview).
|
71
|
+
Creates an [Order](#type-order) that can then be referenced as `order_id` in a request to the [Charge](#endpoint-charge) endpoint. Orders specify products for purchase, along with discounts, taxes, and other settings to apply to the purchase. To associate a created order with a request to the Charge endpoint, provide the order's `id` in the `order_id` field of your request. You cannot modify an order after you create it. If you need to modify an order, instead create a new order with modified details. To learn more about the Orders API, see the [Orders API Overview](https://docs.connect.squareup.com/articles/orders-api-overview).
|
72
72
|
|
73
73
|
### Example
|
74
74
|
```ruby
|
@@ -75,7 +75,7 @@ module SquareConnect
|
|
75
75
|
end
|
76
76
|
|
77
77
|
# CreateOrder
|
78
|
-
# Creates an [Order](#type-order) that can then be referenced as `order_id` in a request to the [Charge](#endpoint-charge) endpoint. Orders specify products for purchase, along with discounts, taxes, and other settings to apply to the purchase. To associate a created order with a request to the Charge endpoint, provide the order's `id` in the `order_id` field of your request. You cannot modify an order after you create it. If you need to modify an order, instead create a new order with modified details. To learn more about the Orders API, see the [Orders API Overview](https://docs.connect.squareup.com/articles/orders-overview).
|
78
|
+
# Creates an [Order](#type-order) that can then be referenced as `order_id` in a request to the [Charge](#endpoint-charge) endpoint. Orders specify products for purchase, along with discounts, taxes, and other settings to apply to the purchase. To associate a created order with a request to the Charge endpoint, provide the order's `id` in the `order_id` field of your request. You cannot modify an order after you create it. If you need to modify an order, instead create a new order with modified details. To learn more about the Orders API, see the [Orders API Overview](https://docs.connect.squareup.com/articles/orders-api-overview).
|
79
79
|
# @param location_id The ID of the business location to associate the order with.
|
80
80
|
# @param body An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
81
81
|
# @param [Hash] opts the optional parameters
|
@@ -86,7 +86,7 @@ module SquareConnect
|
|
86
86
|
end
|
87
87
|
|
88
88
|
# CreateOrder
|
89
|
-
# Creates an [Order](#type-order) that can then be referenced as `order_id` in a request to the [Charge](#endpoint-charge) endpoint. Orders specify products for purchase, along with discounts, taxes, and other settings to apply to the purchase. To associate a created order with a request to the Charge endpoint, provide the order's `id` in the `order_id` field of your request. You cannot modify an order after you create it. If you need to modify an order, instead create a new order with modified details. To learn more about the Orders API, see the [Orders API Overview](https://docs.connect.squareup.com/articles/orders-overview).
|
89
|
+
# Creates an [Order](#type-order) that can then be referenced as `order_id` in a request to the [Charge](#endpoint-charge) endpoint. Orders specify products for purchase, along with discounts, taxes, and other settings to apply to the purchase. To associate a created order with a request to the Charge endpoint, provide the order's `id` in the `order_id` field of your request. You cannot modify an order after you create it. If you need to modify an order, instead create a new order with modified details. To learn more about the Orders API, see the [Orders API Overview](https://docs.connect.squareup.com/articles/orders-api-overview).
|
90
90
|
# @param location_id The ID of the business location to associate the order with.
|
91
91
|
# @param body An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
92
92
|
# @param [Hash] opts the optional parameters
|
@@ -30,7 +30,7 @@ module SquareConnect
|
|
30
30
|
@config = config
|
31
31
|
|
32
32
|
# Construct user agent string. Returns slightly different string for JRuby
|
33
|
-
@user_agent = "Square-Connect-Ruby/2.3.
|
33
|
+
@user_agent = "Square-Connect-Ruby/2.3.1"
|
34
34
|
|
35
35
|
@default_headers = {
|
36
36
|
'Content-Type' => "application/json",
|
@@ -45,6 +45,9 @@ module SquareConnect
|
|
45
45
|
# The buyer's email address, if available. This value is optional, but this transaction is ineligible for chargeback protection if it is not provided.
|
46
46
|
attr_accessor :buyer_email_address
|
47
47
|
|
48
|
+
# The ID of the order to associate with this transaction. If you provide this value, the `amount_money` value of your request must __exactly match__ the `total_money` value of the order's `order_amounts` field.
|
49
|
+
attr_accessor :order_id
|
50
|
+
|
48
51
|
|
49
52
|
# Attribute mapping from ruby-style variable name to JSON key.
|
50
53
|
def self.attribute_map
|
@@ -59,7 +62,8 @@ module SquareConnect
|
|
59
62
|
:'customer_id' => :'customer_id',
|
60
63
|
:'billing_address' => :'billing_address',
|
61
64
|
:'shipping_address' => :'shipping_address',
|
62
|
-
:'buyer_email_address' => :'buyer_email_address'
|
65
|
+
:'buyer_email_address' => :'buyer_email_address',
|
66
|
+
:'order_id' => :'order_id'
|
63
67
|
}
|
64
68
|
end
|
65
69
|
|
@@ -76,7 +80,8 @@ module SquareConnect
|
|
76
80
|
:'customer_id' => :'String',
|
77
81
|
:'billing_address' => :'Address',
|
78
82
|
:'shipping_address' => :'Address',
|
79
|
-
:'buyer_email_address' => :'String'
|
83
|
+
:'buyer_email_address' => :'String',
|
84
|
+
:'order_id' => :'String'
|
80
85
|
}
|
81
86
|
end
|
82
87
|
|
@@ -132,6 +137,10 @@ module SquareConnect
|
|
132
137
|
self.buyer_email_address = attributes[:'buyer_email_address']
|
133
138
|
end
|
134
139
|
|
140
|
+
if attributes.has_key?(:'order_id')
|
141
|
+
self.order_id = attributes[:'order_id']
|
142
|
+
end
|
143
|
+
|
135
144
|
end
|
136
145
|
|
137
146
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -174,6 +183,10 @@ module SquareConnect
|
|
174
183
|
invalid_properties.push("invalid value for 'customer_id', the character length must be smaller than or equal to 50.")
|
175
184
|
end
|
176
185
|
|
186
|
+
if !@order_id.nil? && @order_id.to_s.length > 192
|
187
|
+
invalid_properties.push("invalid value for 'order_id', the character length must be smaller than or equal to 192.")
|
188
|
+
end
|
189
|
+
|
177
190
|
return invalid_properties
|
178
191
|
end
|
179
192
|
|
@@ -189,6 +202,7 @@ module SquareConnect
|
|
189
202
|
return false if !@reference_id.nil? && @reference_id.to_s.length > 40
|
190
203
|
return false if !@note.nil? && @note.to_s.length > 60
|
191
204
|
return false if !@customer_id.nil? && @customer_id.to_s.length > 50
|
205
|
+
return false if !@order_id.nil? && @order_id.to_s.length > 192
|
192
206
|
return true
|
193
207
|
end
|
194
208
|
|
@@ -265,6 +279,17 @@ module SquareConnect
|
|
265
279
|
@customer_id = customer_id
|
266
280
|
end
|
267
281
|
|
282
|
+
# Custom attribute writer method with validation
|
283
|
+
# @param [Object] order_id Value to be assigned
|
284
|
+
def order_id=(order_id)
|
285
|
+
|
286
|
+
if !order_id.nil? && order_id.to_s.length > 192
|
287
|
+
fail ArgumentError, "invalid value for 'order_id', the character length must be smaller than or equal to 192."
|
288
|
+
end
|
289
|
+
|
290
|
+
@order_id = order_id
|
291
|
+
end
|
292
|
+
|
268
293
|
# Checks equality by comparing each attribute.
|
269
294
|
# @param [Object] Object to be compared
|
270
295
|
def ==(o)
|
@@ -280,7 +305,8 @@ module SquareConnect
|
|
280
305
|
customer_id == o.customer_id &&
|
281
306
|
billing_address == o.billing_address &&
|
282
307
|
shipping_address == o.shipping_address &&
|
283
|
-
buyer_email_address == o.buyer_email_address
|
308
|
+
buyer_email_address == o.buyer_email_address &&
|
309
|
+
order_id == o.order_id
|
284
310
|
end
|
285
311
|
|
286
312
|
# @see the `==` method
|
@@ -292,7 +318,7 @@ module SquareConnect
|
|
292
318
|
# Calculates hash code according to all attributes.
|
293
319
|
# @return [Fixnum] Hash code
|
294
320
|
def hash
|
295
|
-
[idempotency_key, amount_money, card_nonce, customer_card_id, delay_capture, reference_id, note, customer_id, billing_address, shipping_address, buyer_email_address].hash
|
321
|
+
[idempotency_key, amount_money, card_nonce, customer_card_id, delay_capture, reference_id, note, customer_id, billing_address, shipping_address, buyer_email_address, order_id].hash
|
296
322
|
end
|
297
323
|
|
298
324
|
# Builds the object from hash
|
data/travis-ci/accounts.enc
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: square_connect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.1.161
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Square, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-09-
|
11
|
+
date: 2017-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|