square.rb 38.1.1.20240717 → 39.0.0.20240821

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: 5cce93ff0125b15e7eade6f156a88af3df95fefe77472e14145003f647ac3290
4
- data.tar.gz: 5fb22cfd130b0e709f84c17a1eee3f3796fb3cf24e69c32c92f11924bb2d8013
3
+ metadata.gz: 1bda4ce1c716807ae293b2cacb11f2e9db303538ddd78828a1eca0a5464615e9
4
+ data.tar.gz: 122c807617e5cc3f57766ef7f2af22b4fd1d24b08c6b56195d41e44cdd2c17ab
5
5
  SHA512:
6
- metadata.gz: 22248613a64e80016c2da4c143cd16833dfdf5d617baafd79cd73194cdeef521e56351a4f0f94c39d088fc77a90e09f1ee3e90b87397dc4525d906937c2936af
7
- data.tar.gz: bc563352893ab4ebc268778f52181f755ea3f4bcc612ea1cd764e4aed18659335af2232133d953ae163fd0d4f454fba827f81b6d1e284fd454c88f2fab3ab7a6
6
+ metadata.gz: 5348106016605477e1878bb2c0397bb8c32445e58b74142cedc1aa26cf1587509dc98b3c5ab4f8fdc31f0d758b270367c776f1af97d8ef756468743fe2339bdd
7
+ data.tar.gz: 212b361dc1a9414fffb346967520ccf74189c30851de9e1632d967fda0d7888dab1066fc1e620109511ad2dba13dcb6208fb99fc05f1279fa12aacdfc4a94afe
@@ -5,7 +5,7 @@ module Square
5
5
  attr_accessor :config, :http_call_back
6
6
 
7
7
  def self.user_agent
8
- 'Square-Ruby-SDK/38.1.1.20240717 ({api-version}) {engine}/{engine-version} ({os-info}) {detail}'
8
+ 'Square-Ruby-SDK/39.0.0.20240821 ({api-version}) {engine}/{engine-version} ({os-info}) {detail}'
9
9
  end
10
10
 
11
11
  def self.user_agent_parameters
@@ -73,9 +73,8 @@ module Square
73
73
 
74
74
  # Creates a gift card activity to manage the balance or state of a [gift
75
75
  # card]($m/GiftCard).
76
- # For example, you create an `ACTIVATE` activity to activate a gift card
77
- # with an initial balance
78
- # before the gift card can be used.
76
+ # For example, create an `ACTIVATE` activity to activate a gift card with an
77
+ # initial balance before first use.
79
78
  # @param [CreateGiftCardActivityRequest] body Required parameter: An object
80
79
  # containing the fields to POST for the request. See the corresponding
81
80
  # object definition for field details.
@@ -50,11 +50,14 @@ module Square
50
50
  end
51
51
 
52
52
  # Creates a digital gift card or registers a physical (plastic) gift card.
53
- # After the gift card
54
- # is created, you must call
55
- # [CreateGiftCardActivity]($e/GiftCardActivities/CreateGiftCardActivity)
56
- # to activate the card with an initial balance before it can be used for
57
- # payment.
53
+ # The resulting gift card
54
+ # has a `PENDING` state. To activate a gift card so that it can be redeemed
55
+ # for purchases, call
56
+ # [CreateGiftCardActivity]($e/GiftCardActivities/CreateGiftCardActivity) and
57
+ # create an `ACTIVATE`
58
+ # activity with the initial balance. Alternatively, you can use
59
+ # [RefundPayment]($e/Refunds/RefundPayment)
60
+ # to refund a payment to the new gift card.
58
61
  # @param [CreateGiftCardRequest] body Required parameter: An object
59
62
  # containing the fields to POST for the request. See the corresponding
60
63
  # object definition for field details.
@@ -89,16 +89,14 @@ module Square
89
89
  # ).
90
90
  # If the access token is expired or not a valid access token, the endpoint
91
91
  # returns an `UNAUTHORIZED` error.
92
- # @param [String] authorization Required parameter: Client
93
- # APPLICATION_SECRET
94
92
  # @return [RetrieveTokenStatusResponse Hash] response from the API call
95
- def retrieve_token_status(authorization:)
93
+ def retrieve_token_status
96
94
  new_api_call_builder
97
95
  .request(new_request_builder(HttpMethodEnum::POST,
98
96
  '/oauth2/token/status',
99
97
  'default')
100
- .header_param(new_parameter(authorization, key: 'Authorization'))
101
- .header_param(new_parameter('application/json', key: 'accept')))
98
+ .header_param(new_parameter('application/json', key: 'accept'))
99
+ .auth(Single.new('global')))
102
100
  .response(new_response_handler
103
101
  .deserializer(APIHelper.method(:json_deserialize))
104
102
  .is_api_response(true)
@@ -37,6 +37,22 @@ module Square
37
37
  # also the maximum allowed value. If the provided value is greater than
38
38
  # 100, it is ignored and the default value is used instead. Default:
39
39
  # `100`
40
+ # @param [TrueClass | FalseClass] is_offline_payment Optional parameter:
41
+ # Whether the payment was taken offline or not.
42
+ # @param [String] offline_begin_time Optional parameter: Indicates the start
43
+ # of the time range for which to retrieve offline payments, in RFC 3339
44
+ # format for timestamps. The range is determined using the
45
+ # `offline_payment_details.client_created_at` field for each Payment. If
46
+ # set, payments without a value set in
47
+ # `offline_payment_details.client_created_at` will not be returned.
48
+ # Default: The current time.
49
+ # @param [String] offline_end_time Optional parameter: Indicates the end of
50
+ # the time range for which to retrieve offline payments, in RFC 3339 format
51
+ # for timestamps. The range is determined using the
52
+ # `offline_payment_details.client_created_at` field for each Payment. If
53
+ # set, payments without a value set in
54
+ # `offline_payment_details.client_created_at` will not be returned.
55
+ # Default: The current time.
40
56
  # @return [ListPaymentsResponse Hash] response from the API call
41
57
  def list_payments(begin_time: nil,
42
58
  end_time: nil,
@@ -46,7 +62,10 @@ module Square
46
62
  total: nil,
47
63
  last_4: nil,
48
64
  card_brand: nil,
49
- limit: nil)
65
+ limit: nil,
66
+ is_offline_payment: false,
67
+ offline_begin_time: nil,
68
+ offline_end_time: nil)
50
69
  new_api_call_builder
51
70
  .request(new_request_builder(HttpMethodEnum::GET,
52
71
  '/v2/payments',
@@ -60,6 +79,9 @@ module Square
60
79
  .query_param(new_parameter(last_4, key: 'last_4'))
61
80
  .query_param(new_parameter(card_brand, key: 'card_brand'))
62
81
  .query_param(new_parameter(limit, key: 'limit'))
82
+ .query_param(new_parameter(is_offline_payment, key: 'is_offline_payment'))
83
+ .query_param(new_parameter(offline_begin_time, key: 'offline_begin_time'))
84
+ .query_param(new_parameter(offline_end_time, key: 'offline_end_time'))
63
85
  .header_param(new_parameter('application/json', key: 'accept'))
64
86
  .auth(Single.new('global')))
65
87
  .response(new_response_handler
data/lib/square/client.rb CHANGED
@@ -5,7 +5,7 @@ module Square
5
5
  attr_reader :config, :auth_managers
6
6
 
7
7
  def sdk_version
8
- '38.1.1.20240717'
8
+ '39.0.0.20240821'
9
9
  end
10
10
 
11
11
  def square_version
@@ -274,7 +274,7 @@ module Square
274
274
  retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524],
275
275
  retry_methods: %i[get put], http_callback: nil, environment: 'production',
276
276
  custom_url: 'https://connect.squareup.com', access_token: nil,
277
- bearer_auth_credentials: nil, square_version: '2024-07-17',
277
+ bearer_auth_credentials: nil, square_version: '2024-08-21',
278
278
  user_agent_detail: '', additional_headers: {}, config: nil
279
279
  )
280
280
  @config = if config.nil?
@@ -24,7 +24,7 @@ module Square
24
24
  retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524],
25
25
  retry_methods: %i[get put], http_callback: nil, environment: 'production',
26
26
  custom_url: 'https://connect.squareup.com', access_token: nil,
27
- bearer_auth_credentials: nil, square_version: '2024-07-17',
27
+ bearer_auth_credentials: nil, square_version: '2024-08-21',
28
28
  user_agent_detail: '', additional_headers: {}
29
29
  )
30
30
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: square.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 38.1.1.20240717
4
+ version: 39.0.0.20240821
5
5
  platform: ruby
6
6
  authors:
7
7
  - Square Developer Platform
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-17 00:00:00.000000000 Z
11
+ date: 2024-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: apimatic_core_interfaces
@@ -58,20 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '5.14'
62
- - - ">="
63
- - !ruby/object:Gem::Version
64
- version: 5.14.1
61
+ version: 5.24.0
65
62
  type: :development
66
63
  prerelease: false
67
64
  version_requirements: !ruby/object:Gem::Requirement
68
65
  requirements:
69
66
  - - "~>"
70
67
  - !ruby/object:Gem::Version
71
- version: '5.14'
72
- - - ">="
73
- - !ruby/object:Gem::Version
74
- version: 5.14.1
68
+ version: 5.24.0
75
69
  - !ruby/object:Gem::Dependency
76
70
  name: minitest-proveit
77
71
  requirement: !ruby/object:Gem::Requirement