digital-payments-sdk 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 (70) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +33 -20
  3. data/lib/{shell_ev → shell_smart_pay_api}/api_helper.rb +2 -2
  4. data/lib/{shell_ev → shell_smart_pay_api}/client.rb +4 -4
  5. data/lib/{shell_ev → shell_smart_pay_api}/configuration.rb +11 -8
  6. data/lib/{shell_ev → shell_smart_pay_api}/controllers/base_controller.rb +11 -11
  7. data/lib/shell_smart_pay_api/controllers/digital_payment_enablement_controller.rb +57 -0
  8. data/lib/{shell_ev → shell_smart_pay_api}/controllers/fueling_controller.rb +50 -49
  9. data/lib/{shell_ev → shell_smart_pay_api}/controllers/partner_notification_controller.rb +27 -27
  10. data/lib/{shell_ev → shell_smart_pay_api}/controllers/shell_api_platform_security_authentication_controller.rb +9 -9
  11. data/lib/{shell_ev → shell_smart_pay_api}/controllers/station_locator_controller.rb +22 -22
  12. data/lib/{shell_ev → shell_smart_pay_api}/exceptions/access_token_error_exception.rb +28 -16
  13. data/lib/shell_smart_pay_api/exceptions/api_exception.rb +21 -0
  14. data/lib/{shell_ev → shell_smart_pay_api}/exceptions/cancel_fueling_error_response_error_exception.rb +31 -17
  15. data/lib/{shell_ev → shell_smart_pay_api}/exceptions/mpp_acces_token_error_response_exception.rb +31 -17
  16. data/lib/{shell_ev → shell_smart_pay_api}/exceptions/payment_enablement_error_response_exception.rb +28 -16
  17. data/lib/{shell_ev → shell_smart_pay_api}/exceptions/station_locator_bad_request_exception.rb +30 -17
  18. data/lib/{shell_ev → shell_smart_pay_api}/exceptions/station_locator_forbidden_exception.rb +30 -17
  19. data/lib/{shell_ev → shell_smart_pay_api}/exceptions/station_locator_internal_server_error_exception.rb +30 -17
  20. data/lib/{shell_ev → shell_smart_pay_api}/exceptions/station_locator_not_found_exception.rb +30 -17
  21. data/lib/{shell_ev → shell_smart_pay_api}/exceptions/station_locator_unauthorized_exception.rb +30 -17
  22. data/lib/{shell_ev → shell_smart_pay_api}/http/auth/mpp_token.rb +2 -2
  23. data/lib/{shell_ev → shell_smart_pay_api}/http/auth/o_auth_token_post.rb +2 -2
  24. data/lib/{shell_ev → shell_smart_pay_api}/http/http_call_back.rb +2 -2
  25. data/lib/{shell_ev → shell_smart_pay_api}/http/http_method_enum.rb +2 -2
  26. data/lib/{shell_ev → shell_smart_pay_api}/http/http_request.rb +2 -2
  27. data/lib/{shell_ev → shell_smart_pay_api}/http/http_response.rb +2 -2
  28. data/lib/{shell_ev → shell_smart_pay_api}/models/access_token_response.rb +17 -4
  29. data/lib/{shell_ev → shell_smart_pay_api}/models/around_location_array.rb +16 -4
  30. data/lib/shell_smart_pay_api/models/base_model.rb +110 -0
  31. data/lib/{shell_ev → shell_smart_pay_api}/models/cancel_fueling_error_response.rb +17 -5
  32. data/lib/{shell_ev → shell_smart_pay_api}/models/cancel_fueling_request.rb +16 -4
  33. data/lib/{shell_ev → shell_smart_pay_api}/models/collecting_company.rb +14 -2
  34. data/lib/{shell_ev/models/around_location_array_data_items.rb → shell_smart_pay_api/models/datum.rb} +78 -57
  35. data/lib/{shell_ev/models/fault_response_fault_detail.rb → shell_smart_pay_api/models/detail.rb} +17 -5
  36. data/lib/{shell_ev/models/prepare_fueling_request_device_details_items.rb → shell_smart_pay_api/models/device_detail.rb} +23 -11
  37. data/lib/{shell_ev/models/fault_response_fault.rb → shell_smart_pay_api/models/fault.rb} +21 -10
  38. data/lib/{shell_ev → shell_smart_pay_api}/models/fault_response.rb +16 -4
  39. data/lib/{shell_ev → shell_smart_pay_api}/models/finalise_fueling_request.rb +31 -18
  40. data/lib/{shell_ev/models/around_location_array_data_items_loc.rb → shell_smart_pay_api/models/loc.rb} +25 -15
  41. data/lib/{shell_ev → shell_smart_pay_api}/models/loyalty_details.rb +16 -4
  42. data/lib/{shell_ev → shell_smart_pay_api}/models/mobile_payment_registration_request.rb +22 -10
  43. data/lib/{shell_ev → shell_smart_pay_api}/models/mpp_acces_token_response.rb +18 -6
  44. data/lib/{shell_ev → shell_smart_pay_api}/models/mpp_error.rb +18 -7
  45. data/lib/{shell_ev/models/around_location_array_data_items_opening_hours_items.rb → shell_smart_pay_api/models/opening_hour.rb} +40 -24
  46. data/lib/{shell_ev/models/finalise_fueling_request_payment.rb → shell_smart_pay_api/models/payment.rb} +22 -10
  47. data/lib/{shell_ev/models/payment_details_items.rb → shell_smart_pay_api/models/payment_details.rb} +22 -9
  48. data/lib/{shell_ev → shell_smart_pay_api}/models/payment_enablement_response.rb +14 -2
  49. data/lib/{shell_ev → shell_smart_pay_api}/models/payment_properties.rb +24 -10
  50. data/lib/{shell_ev → shell_smart_pay_api}/models/prepare_fueling_request.rb +31 -24
  51. data/lib/{shell_ev → shell_smart_pay_api}/models/prepare_fueling_response.rb +16 -4
  52. data/lib/{shell_ev/models/finalise_fueling_request_products_items.rb → shell_smart_pay_api/models/product.rb} +22 -10
  53. data/lib/{shell_ev → shell_smart_pay_api}/utilities/date_time_helper.rb +2 -2
  54. data/lib/shell_smart_pay_api/utilities/file_wrapper.rb +28 -0
  55. data/lib/shell_smart_pay_api.rb +89 -0
  56. data/test/controllers/controller_test_base.rb +3 -3
  57. data/test/controllers/test_fueling_controller.rb +1 -1
  58. data/test/controllers/test_partner_notification_controller.rb +1 -1
  59. data/test/controllers/test_shell_api_platform_security_authentication_controller.rb +1 -1
  60. data/test/controllers/test_station_locator_controller.rb +1 -1
  61. data/test/http_response_catcher.rb +2 -2
  62. metadata +63 -72
  63. data/lib/shell_ev/controllers/digital_payment_enablement_controller.rb +0 -56
  64. data/lib/shell_ev/exceptions/api_exception.rb +0 -10
  65. data/lib/shell_ev/models/base_model.rb +0 -62
  66. data/lib/shell_ev/models/mpp_token_request_body.rb +0 -73
  67. data/lib/shell_ev/models/oauth_token_post_request_body.rb +0 -73
  68. data/lib/shell_ev/models/partner_token_request_body.rb +0 -73
  69. data/lib/shell_ev/utilities/file_wrapper.rb +0 -16
  70. data/lib/shell_ev.rb +0 -85
@@ -1,11 +1,11 @@
1
- # shell_ev
1
+ # shell_smart_pay_api
2
2
  #
3
3
  # This file was automatically generated by APIMATIC v2.0
4
4
  # ( https://apimatic.io ).
5
5
 
6
- module ShellEv
7
- # FaultResponseFaultDetail Model.
8
- class FaultResponseFaultDetail < BaseModel
6
+ module ShellSmartPayApi
7
+ # Detail Model.
8
+ class Detail < BaseModel
9
9
  SKIP = Object.new
10
10
  private_constant :SKIP
11
11
 
@@ -44,7 +44,19 @@ module ShellEv
44
44
  errorcode = hash.key?('errorcode') ? hash['errorcode'] : SKIP
45
45
 
46
46
  # Create object from extracted values.
47
- FaultResponseFaultDetail.new(errorcode)
47
+ Detail.new(errorcode)
48
+ end
49
+
50
+ # Provides a human-readable string representation of the object.
51
+ def to_s
52
+ class_name = self.class.name.split('::').last
53
+ "<#{class_name} errorcode: #{@errorcode}>"
54
+ end
55
+
56
+ # Provides a debugging-friendly string with detailed object information.
57
+ def inspect
58
+ class_name = self.class.name.split('::').last
59
+ "<#{class_name} errorcode: #{@errorcode.inspect}>"
48
60
  end
49
61
  end
50
62
  end
@@ -1,11 +1,11 @@
1
- # shell_ev
1
+ # shell_smart_pay_api
2
2
  #
3
3
  # This file was automatically generated by APIMATIC v2.0
4
4
  # ( https://apimatic.io ).
5
5
 
6
- module ShellEv
7
- # PrepareFuelingRequestDeviceDetailsItems Model.
8
- class PrepareFuelingRequestDeviceDetailsItems < BaseModel
6
+ module ShellSmartPayApi
7
+ # DeviceDetail Model.
8
+ class DeviceDetail < BaseModel
9
9
  SKIP = Object.new
10
10
  private_constant :SKIP
11
11
 
@@ -64,9 +64,7 @@ module ShellEv
64
64
  []
65
65
  end
66
66
 
67
- def initialize(device_id = SKIP,
68
- model = SKIP,
69
- os_version = SKIP,
67
+ def initialize(device_id = SKIP, model = SKIP, os_version = SKIP,
70
68
  other_device_information = SKIP)
71
69
  @device_id = device_id unless device_id == SKIP
72
70
  @model = model unless model == SKIP
@@ -86,10 +84,24 @@ module ShellEv
86
84
  hash.key?('otherDeviceInformation') ? hash['otherDeviceInformation'] : SKIP
87
85
 
88
86
  # Create object from extracted values.
89
- PrepareFuelingRequestDeviceDetailsItems.new(device_id,
90
- model,
91
- os_version,
92
- other_device_information)
87
+ DeviceDetail.new(device_id,
88
+ model,
89
+ os_version,
90
+ other_device_information)
91
+ end
92
+
93
+ # Provides a human-readable string representation of the object.
94
+ def to_s
95
+ class_name = self.class.name.split('::').last
96
+ "<#{class_name} device_id: #{@device_id}, model: #{@model}, os_version: #{@os_version},"\
97
+ " other_device_information: #{@other_device_information}>"
98
+ end
99
+
100
+ # Provides a debugging-friendly string with detailed object information.
101
+ def inspect
102
+ class_name = self.class.name.split('::').last
103
+ "<#{class_name} device_id: #{@device_id.inspect}, model: #{@model.inspect}, os_version:"\
104
+ " #{@os_version.inspect}, other_device_information: #{@other_device_information.inspect}>"
93
105
  end
94
106
  end
95
107
  end
@@ -1,11 +1,11 @@
1
- # shell_ev
1
+ # shell_smart_pay_api
2
2
  #
3
3
  # This file was automatically generated by APIMATIC v2.0
4
4
  # ( https://apimatic.io ).
5
5
 
6
- module ShellEv
7
- # FaultResponseFault Model.
8
- class FaultResponseFault < BaseModel
6
+ module ShellSmartPayApi
7
+ # Fault Model.
8
+ class Fault < BaseModel
9
9
  SKIP = Object.new
10
10
  private_constant :SKIP
11
11
 
@@ -14,7 +14,7 @@ module ShellEv
14
14
  attr_accessor :faultstring
15
15
 
16
16
  # The description of the error.
17
- # @return [FaultResponseFaultDetail]
17
+ # @return [Detail]
18
18
  attr_accessor :detail
19
19
 
20
20
  # A mapping from model property names to API property names.
@@ -38,8 +38,7 @@ module ShellEv
38
38
  []
39
39
  end
40
40
 
41
- def initialize(faultstring = SKIP,
42
- detail = SKIP)
41
+ def initialize(faultstring = SKIP, detail = SKIP)
43
42
  @faultstring = faultstring unless faultstring == SKIP
44
43
  @detail = detail unless detail == SKIP
45
44
  end
@@ -50,11 +49,23 @@ module ShellEv
50
49
 
51
50
  # Extract variables from the hash.
52
51
  faultstring = hash.key?('faultstring') ? hash['faultstring'] : SKIP
53
- detail = FaultResponseFaultDetail.from_hash(hash['detail']) if hash['detail']
52
+ detail = Detail.from_hash(hash['detail']) if hash['detail']
54
53
 
55
54
  # Create object from extracted values.
56
- FaultResponseFault.new(faultstring,
57
- detail)
55
+ Fault.new(faultstring,
56
+ detail)
57
+ end
58
+
59
+ # Provides a human-readable string representation of the object.
60
+ def to_s
61
+ class_name = self.class.name.split('::').last
62
+ "<#{class_name} faultstring: #{@faultstring}, detail: #{@detail}>"
63
+ end
64
+
65
+ # Provides a debugging-friendly string with detailed object information.
66
+ def inspect
67
+ class_name = self.class.name.split('::').last
68
+ "<#{class_name} faultstring: #{@faultstring.inspect}, detail: #{@detail.inspect}>"
58
69
  end
59
70
  end
60
71
  end
@@ -1,16 +1,16 @@
1
- # shell_ev
1
+ # shell_smart_pay_api
2
2
  #
3
3
  # This file was automatically generated by APIMATIC v2.0
4
4
  # ( https://apimatic.io ).
5
5
 
6
- module ShellEv
6
+ module ShellSmartPayApi
7
7
  # An error response.
8
8
  class FaultResponse < BaseModel
9
9
  SKIP = Object.new
10
10
  private_constant :SKIP
11
11
 
12
12
  # TODO: Write general description for this method
13
- # @return [FaultResponseFault]
13
+ # @return [Fault]
14
14
  attr_accessor :fault
15
15
 
16
16
  # A mapping from model property names to API property names.
@@ -41,10 +41,22 @@ module ShellEv
41
41
  return nil unless hash
42
42
 
43
43
  # Extract variables from the hash.
44
- fault = FaultResponseFault.from_hash(hash['fault']) if hash['fault']
44
+ fault = Fault.from_hash(hash['fault']) if hash['fault']
45
45
 
46
46
  # Create object from extracted values.
47
47
  FaultResponse.new(fault)
48
48
  end
49
+
50
+ # Provides a human-readable string representation of the object.
51
+ def to_s
52
+ class_name = self.class.name.split('::').last
53
+ "<#{class_name} fault: #{@fault}>"
54
+ end
55
+
56
+ # Provides a debugging-friendly string with detailed object information.
57
+ def inspect
58
+ class_name = self.class.name.split('::').last
59
+ "<#{class_name} fault: #{@fault.inspect}>"
60
+ end
49
61
  end
50
62
  end
@@ -1,9 +1,9 @@
1
- # shell_ev
1
+ # shell_smart_pay_api
2
2
  #
3
3
  # This file was automatically generated by APIMATIC v2.0
4
4
  # ( https://apimatic.io ).
5
5
 
6
- module ShellEv
6
+ module ShellSmartPayApi
7
7
  # FinaliseFuelingRequest Model.
8
8
  class FinaliseFuelingRequest < BaseModel
9
9
  SKIP = Object.new
@@ -50,11 +50,11 @@ module ShellEv
50
50
  attr_accessor :discount
51
51
 
52
52
  # TODO: Write general description for this method
53
- # @return [FinaliseFuelingRequestPayment]
53
+ # @return [Payment]
54
54
  attr_accessor :payment
55
55
 
56
56
  # TODO: Write general description for this method
57
- # @return [Array[FinaliseFuelingRequestProductsItems]]
57
+ # @return [Array[Product]]
58
58
  attr_accessor :products
59
59
 
60
60
  # TODO: Write general description for this method
@@ -104,18 +104,10 @@ module ShellEv
104
104
  []
105
105
  end
106
106
 
107
- def initialize(site_name = SKIP,
108
- timestamp = SKIP,
109
- volume_quantity = SKIP,
110
- volume_unit = SKIP,
111
- final_price = SKIP,
112
- currency = SKIP,
113
- status = SKIP,
114
- site_address = SKIP,
115
- original_price = SKIP,
116
- discount = SKIP,
117
- payment = SKIP,
118
- products = SKIP,
107
+ def initialize(site_name = SKIP, timestamp = SKIP, volume_quantity = SKIP,
108
+ volume_unit = SKIP, final_price = SKIP, currency = SKIP,
109
+ status = SKIP, site_address = SKIP, original_price = SKIP,
110
+ discount = SKIP, payment = SKIP, products = SKIP,
119
111
  mpp_transaction_id = SKIP)
120
112
  @site_name = site_name unless site_name == SKIP
121
113
  @timestamp = timestamp unless timestamp == SKIP
@@ -148,13 +140,13 @@ module ShellEv
148
140
  site_address = hash.key?('siteAddress') ? hash['siteAddress'] : SKIP
149
141
  original_price = hash.key?('originalPrice') ? hash['originalPrice'] : SKIP
150
142
  discount = hash.key?('discount') ? hash['discount'] : SKIP
151
- payment = FinaliseFuelingRequestPayment.from_hash(hash['payment']) if hash['payment']
143
+ payment = Payment.from_hash(hash['payment']) if hash['payment']
152
144
  # Parameter is an array, so we need to iterate through it
153
145
  products = nil
154
146
  unless hash['products'].nil?
155
147
  products = []
156
148
  hash['products'].each do |structure|
157
- products << (FinaliseFuelingRequestProductsItems.from_hash(structure) if structure)
149
+ products << (Product.from_hash(structure) if structure)
158
150
  end
159
151
  end
160
152
 
@@ -177,5 +169,26 @@ module ShellEv
177
169
  products,
178
170
  mpp_transaction_id)
179
171
  end
172
+
173
+ # Provides a human-readable string representation of the object.
174
+ def to_s
175
+ class_name = self.class.name.split('::').last
176
+ "<#{class_name} site_name: #{@site_name}, timestamp: #{@timestamp}, volume_quantity:"\
177
+ " #{@volume_quantity}, volume_unit: #{@volume_unit}, final_price: #{@final_price}, currency:"\
178
+ " #{@currency}, status: #{@status}, site_address: #{@site_address}, original_price:"\
179
+ " #{@original_price}, discount: #{@discount}, payment: #{@payment}, products: #{@products},"\
180
+ " mpp_transaction_id: #{@mpp_transaction_id}>"
181
+ end
182
+
183
+ # Provides a debugging-friendly string with detailed object information.
184
+ def inspect
185
+ class_name = self.class.name.split('::').last
186
+ "<#{class_name} site_name: #{@site_name.inspect}, timestamp: #{@timestamp.inspect},"\
187
+ " volume_quantity: #{@volume_quantity.inspect}, volume_unit: #{@volume_unit.inspect},"\
188
+ " final_price: #{@final_price.inspect}, currency: #{@currency.inspect}, status:"\
189
+ " #{@status.inspect}, site_address: #{@site_address.inspect}, original_price:"\
190
+ " #{@original_price.inspect}, discount: #{@discount.inspect}, payment: #{@payment.inspect},"\
191
+ " products: #{@products.inspect}, mpp_transaction_id: #{@mpp_transaction_id.inspect}>"
192
+ end
180
193
  end
181
194
  end
@@ -1,11 +1,11 @@
1
- # shell_ev
1
+ # shell_smart_pay_api
2
2
  #
3
3
  # This file was automatically generated by APIMATIC v2.0
4
4
  # ( https://apimatic.io ).
5
5
 
6
- module ShellEv
6
+ module ShellSmartPayApi
7
7
  # Object containing address details/elements
8
- class AroundLocationArrayDataItemsLoc < BaseModel
8
+ class Loc < BaseModel
9
9
  SKIP = Object.new
10
10
  private_constant :SKIP
11
11
 
@@ -61,12 +61,8 @@ module ShellEv
61
61
  []
62
62
  end
63
63
 
64
- def initialize(country = nil,
65
- ccode = nil,
66
- street = SKIP,
67
- pc = SKIP,
68
- city = SKIP,
69
- region = SKIP)
64
+ def initialize(country = nil, ccode = nil, street = SKIP, pc = SKIP,
65
+ city = SKIP, region = SKIP)
70
66
  @street = street unless street == SKIP
71
67
  @pc = pc unless pc == SKIP
72
68
  @city = city unless city == SKIP
@@ -88,12 +84,26 @@ module ShellEv
88
84
  region = hash.key?('region') ? hash['region'] : SKIP
89
85
 
90
86
  # Create object from extracted values.
91
- AroundLocationArrayDataItemsLoc.new(country,
92
- ccode,
93
- street,
94
- pc,
95
- city,
96
- region)
87
+ Loc.new(country,
88
+ ccode,
89
+ street,
90
+ pc,
91
+ city,
92
+ region)
93
+ end
94
+
95
+ # Provides a human-readable string representation of the object.
96
+ def to_s
97
+ class_name = self.class.name.split('::').last
98
+ "<#{class_name} street: #{@street}, pc: #{@pc}, city: #{@city}, region: #{@region},"\
99
+ " country: #{@country}, ccode: #{@ccode}>"
100
+ end
101
+
102
+ # Provides a debugging-friendly string with detailed object information.
103
+ def inspect
104
+ class_name = self.class.name.split('::').last
105
+ "<#{class_name} street: #{@street.inspect}, pc: #{@pc.inspect}, city: #{@city.inspect},"\
106
+ " region: #{@region.inspect}, country: #{@country.inspect}, ccode: #{@ccode.inspect}>"
97
107
  end
98
108
  end
99
109
  end
@@ -1,9 +1,9 @@
1
- # shell_ev
1
+ # shell_smart_pay_api
2
2
  #
3
3
  # This file was automatically generated by APIMATIC v2.0
4
4
  # ( https://apimatic.io ).
5
5
 
6
- module ShellEv
6
+ module ShellSmartPayApi
7
7
  # LoyaltyDetails Model.
8
8
  class LoyaltyDetails < BaseModel
9
9
  SKIP = Object.new
@@ -37,8 +37,7 @@ module ShellEv
37
37
  []
38
38
  end
39
39
 
40
- def initialize(loyalty_id = nil,
41
- loyalty_type = nil)
40
+ def initialize(loyalty_id = nil, loyalty_type = nil)
42
41
  @loyalty_id = loyalty_id
43
42
  @loyalty_type = loyalty_type
44
43
  end
@@ -55,5 +54,18 @@ module ShellEv
55
54
  LoyaltyDetails.new(loyalty_id,
56
55
  loyalty_type)
57
56
  end
57
+
58
+ # Provides a human-readable string representation of the object.
59
+ def to_s
60
+ class_name = self.class.name.split('::').last
61
+ "<#{class_name} loyalty_id: #{@loyalty_id}, loyalty_type: #{@loyalty_type}>"
62
+ end
63
+
64
+ # Provides a debugging-friendly string with detailed object information.
65
+ def inspect
66
+ class_name = self.class.name.split('::').last
67
+ "<#{class_name} loyalty_id: #{@loyalty_id.inspect}, loyalty_type:"\
68
+ " #{@loyalty_type.inspect}>"
69
+ end
58
70
  end
59
71
  end
@@ -1,9 +1,9 @@
1
- # shell_ev
1
+ # shell_smart_pay_api
2
2
  #
3
3
  # This file was automatically generated by APIMATIC v2.0
4
4
  # ( https://apimatic.io ).
5
5
 
6
- module ShellEv
6
+ module ShellSmartPayApi
7
7
  # MobilePaymentRegistrationRequest Model.
8
8
  class MobilePaymentRegistrationRequest < BaseModel
9
9
  SKIP = Object.new
@@ -79,14 +79,9 @@ module ShellEv
79
79
  []
80
80
  end
81
81
 
82
- def initialize(reference_id = nil,
83
- pan = nil,
84
- pan_expiry = nil,
85
- period = nil,
86
- account_id = nil,
87
- payer_id = nil,
88
- col_co_id = nil,
89
- collecting_companies = nil)
82
+ def initialize(reference_id = nil, pan = nil, pan_expiry = nil,
83
+ period = nil, account_id = nil, payer_id = nil,
84
+ col_co_id = nil, collecting_companies = nil)
90
85
  @reference_id = reference_id
91
86
  @pan = pan
92
87
  @pan_expiry = pan_expiry
@@ -130,5 +125,22 @@ module ShellEv
130
125
  col_co_id,
131
126
  collecting_companies)
132
127
  end
128
+
129
+ # Provides a human-readable string representation of the object.
130
+ def to_s
131
+ class_name = self.class.name.split('::').last
132
+ "<#{class_name} reference_id: #{@reference_id}, pan: #{@pan}, pan_expiry: #{@pan_expiry},"\
133
+ " period: #{@period}, account_id: #{@account_id}, payer_id: #{@payer_id}, col_co_id:"\
134
+ " #{@col_co_id}, collecting_companies: #{@collecting_companies}>"
135
+ end
136
+
137
+ # Provides a debugging-friendly string with detailed object information.
138
+ def inspect
139
+ class_name = self.class.name.split('::').last
140
+ "<#{class_name} reference_id: #{@reference_id.inspect}, pan: #{@pan.inspect}, pan_expiry:"\
141
+ " #{@pan_expiry.inspect}, period: #{@period.inspect}, account_id: #{@account_id.inspect},"\
142
+ " payer_id: #{@payer_id.inspect}, col_co_id: #{@col_co_id.inspect}, collecting_companies:"\
143
+ " #{@collecting_companies.inspect}>"
144
+ end
133
145
  end
134
146
  end
@@ -1,9 +1,9 @@
1
- # shell_ev
1
+ # shell_smart_pay_api
2
2
  #
3
3
  # This file was automatically generated by APIMATIC v2.0
4
4
  # ( https://apimatic.io ).
5
5
 
6
- module ShellEv
6
+ module ShellSmartPayApi
7
7
  # MppAccesTokenResponse Model.
8
8
  class MppAccesTokenResponse < BaseModel
9
9
  SKIP = Object.new
@@ -51,10 +51,8 @@ module ShellEv
51
51
  []
52
52
  end
53
53
 
54
- def initialize(access_token = SKIP,
55
- token_type = 'bearer',
56
- expires_in = SKIP,
57
- scope = 'basic openid')
54
+ def initialize(access_token = SKIP, token_type = 'bearer',
55
+ expires_in = SKIP, scope = 'basic openid')
58
56
  @access_token = access_token unless access_token == SKIP
59
57
  @token_type = token_type unless token_type == SKIP
60
58
  @expires_in = expires_in unless expires_in == SKIP
@@ -77,5 +75,19 @@ module ShellEv
77
75
  expires_in,
78
76
  scope)
79
77
  end
78
+
79
+ # Provides a human-readable string representation of the object.
80
+ def to_s
81
+ class_name = self.class.name.split('::').last
82
+ "<#{class_name} access_token: #{@access_token}, token_type: #{@token_type}, expires_in:"\
83
+ " #{@expires_in}, scope: #{@scope}>"
84
+ end
85
+
86
+ # Provides a debugging-friendly string with detailed object information.
87
+ def inspect
88
+ class_name = self.class.name.split('::').last
89
+ "<#{class_name} access_token: #{@access_token.inspect}, token_type: #{@token_type.inspect},"\
90
+ " expires_in: #{@expires_in.inspect}, scope: #{@scope.inspect}>"
91
+ end
80
92
  end
81
93
  end
@@ -1,9 +1,9 @@
1
- # shell_ev
1
+ # shell_smart_pay_api
2
2
  #
3
3
  # This file was automatically generated by APIMATIC v2.0
4
4
  # ( https://apimatic.io ).
5
5
 
6
- module ShellEv
6
+ module ShellSmartPayApi
7
7
  # MppError Model.
8
8
  class MppError < BaseModel
9
9
  SKIP = Object.new
@@ -60,11 +60,8 @@ module ShellEv
60
60
  []
61
61
  end
62
62
 
63
- def initialize(message = SKIP,
64
- reason = SKIP,
65
- subject = SKIP,
66
- subject_type = SKIP,
67
- type = SKIP)
63
+ def initialize(message = SKIP, reason = SKIP, subject = SKIP,
64
+ subject_type = SKIP, type = SKIP)
68
65
  @message = message unless message == SKIP
69
66
  @reason = reason unless reason == SKIP
70
67
  @subject = subject unless subject == SKIP
@@ -90,5 +87,19 @@ module ShellEv
90
87
  subject_type,
91
88
  type)
92
89
  end
90
+
91
+ # Provides a human-readable string representation of the object.
92
+ def to_s
93
+ class_name = self.class.name.split('::').last
94
+ "<#{class_name} message: #{@message}, reason: #{@reason}, subject: #{@subject},"\
95
+ " subject_type: #{@subject_type}, type: #{@type}>"
96
+ end
97
+
98
+ # Provides a debugging-friendly string with detailed object information.
99
+ def inspect
100
+ class_name = self.class.name.split('::').last
101
+ "<#{class_name} message: #{@message.inspect}, reason: #{@reason.inspect}, subject:"\
102
+ " #{@subject.inspect}, subject_type: #{@subject_type.inspect}, type: #{@type.inspect}>"
103
+ end
93
104
  end
94
105
  end
@@ -1,11 +1,11 @@
1
- # shell_ev
1
+ # shell_smart_pay_api
2
2
  #
3
3
  # This file was automatically generated by APIMATIC v2.0
4
4
  # ( https://apimatic.io ).
5
5
 
6
- module ShellEv
7
- # AroundLocationArrayDataItemsOpeningHoursItems Model.
8
- class AroundLocationArrayDataItemsOpeningHoursItems < BaseModel
6
+ module ShellSmartPayApi
7
+ # OpeningHour Model.
8
+ class OpeningHour < BaseModel
9
9
  SKIP = Object.new
10
10
  private_constant :SKIP
11
11
 
@@ -86,16 +86,11 @@ module ShellEv
86
86
  []
87
87
  end
88
88
 
89
- def initialize(closing_from_hours = SKIP,
90
- closing_from_minutes = SKIP,
91
- closing_to_hours = SKIP,
92
- closing_to_minutes = SKIP,
93
- from_day = SKIP,
94
- opening_from_hours = SKIP,
95
- opening_from_minutes = SKIP,
96
- opening_to_hours = SKIP,
97
- opening_to_minutes = SKIP,
98
- to_day = SKIP)
89
+ def initialize(closing_from_hours = SKIP, closing_from_minutes = SKIP,
90
+ closing_to_hours = SKIP, closing_to_minutes = SKIP,
91
+ from_day = SKIP, opening_from_hours = SKIP,
92
+ opening_from_minutes = SKIP, opening_to_hours = SKIP,
93
+ opening_to_minutes = SKIP, to_day = SKIP)
99
94
  @closing_from_hours = closing_from_hours unless closing_from_hours == SKIP
100
95
  @closing_from_minutes = closing_from_minutes unless closing_from_minutes == SKIP
101
96
  @closing_to_hours = closing_to_hours unless closing_to_hours == SKIP
@@ -133,16 +128,37 @@ module ShellEv
133
128
  to_day = hash.key?('To_Day') ? hash['To_Day'] : SKIP
134
129
 
135
130
  # Create object from extracted values.
136
- AroundLocationArrayDataItemsOpeningHoursItems.new(closing_from_hours,
137
- closing_from_minutes,
138
- closing_to_hours,
139
- closing_to_minutes,
140
- from_day,
141
- opening_from_hours,
142
- opening_from_minutes,
143
- opening_to_hours,
144
- opening_to_minutes,
145
- to_day)
131
+ OpeningHour.new(closing_from_hours,
132
+ closing_from_minutes,
133
+ closing_to_hours,
134
+ closing_to_minutes,
135
+ from_day,
136
+ opening_from_hours,
137
+ opening_from_minutes,
138
+ opening_to_hours,
139
+ opening_to_minutes,
140
+ to_day)
141
+ end
142
+
143
+ # Provides a human-readable string representation of the object.
144
+ def to_s
145
+ class_name = self.class.name.split('::').last
146
+ "<#{class_name} closing_from_hours: #{@closing_from_hours}, closing_from_minutes:"\
147
+ " #{@closing_from_minutes}, closing_to_hours: #{@closing_to_hours}, closing_to_minutes:"\
148
+ " #{@closing_to_minutes}, from_day: #{@from_day}, opening_from_hours:"\
149
+ " #{@opening_from_hours}, opening_from_minutes: #{@opening_from_minutes}, opening_to_hours:"\
150
+ " #{@opening_to_hours}, opening_to_minutes: #{@opening_to_minutes}, to_day: #{@to_day}>"
151
+ end
152
+
153
+ # Provides a debugging-friendly string with detailed object information.
154
+ def inspect
155
+ class_name = self.class.name.split('::').last
156
+ "<#{class_name} closing_from_hours: #{@closing_from_hours.inspect}, closing_from_minutes:"\
157
+ " #{@closing_from_minutes.inspect}, closing_to_hours: #{@closing_to_hours.inspect},"\
158
+ " closing_to_minutes: #{@closing_to_minutes.inspect}, from_day: #{@from_day.inspect},"\
159
+ " opening_from_hours: #{@opening_from_hours.inspect}, opening_from_minutes:"\
160
+ " #{@opening_from_minutes.inspect}, opening_to_hours: #{@opening_to_hours.inspect},"\
161
+ " opening_to_minutes: #{@opening_to_minutes.inspect}, to_day: #{@to_day.inspect}>"
146
162
  end
147
163
  end
148
164
  end
@@ -1,11 +1,11 @@
1
- # shell_ev
1
+ # shell_smart_pay_api
2
2
  #
3
3
  # This file was automatically generated by APIMATIC v2.0
4
4
  # ( https://apimatic.io ).
5
5
 
6
- module ShellEv
7
- # FinaliseFuelingRequestPayment Model.
8
- class FinaliseFuelingRequestPayment < BaseModel
6
+ module ShellSmartPayApi
7
+ # Payment Model.
8
+ class Payment < BaseModel
9
9
  SKIP = Object.new
10
10
  private_constant :SKIP
11
11
 
@@ -44,9 +44,7 @@ module ShellEv
44
44
  []
45
45
  end
46
46
 
47
- def initialize(method = SKIP,
48
- card_id = SKIP,
49
- card_last_digits = SKIP)
47
+ def initialize(method = SKIP, card_id = SKIP, card_last_digits = SKIP)
50
48
  @method = method unless method == SKIP
51
49
  @card_id = card_id unless card_id == SKIP
52
50
  @card_last_digits = card_last_digits unless card_last_digits == SKIP
@@ -63,9 +61,23 @@ module ShellEv
63
61
  hash.key?('cardLastDigits') ? hash['cardLastDigits'] : SKIP
64
62
 
65
63
  # Create object from extracted values.
66
- FinaliseFuelingRequestPayment.new(method,
67
- card_id,
68
- card_last_digits)
64
+ Payment.new(method,
65
+ card_id,
66
+ card_last_digits)
67
+ end
68
+
69
+ # Provides a human-readable string representation of the object.
70
+ def to_s
71
+ class_name = self.class.name.split('::').last
72
+ "<#{class_name} method: #{@method}, card_id: #{@card_id}, card_last_digits:"\
73
+ " #{@card_last_digits}>"
74
+ end
75
+
76
+ # Provides a debugging-friendly string with detailed object information.
77
+ def inspect
78
+ class_name = self.class.name.split('::').last
79
+ "<#{class_name} method: #{@method.inspect}, card_id: #{@card_id.inspect}, card_last_digits:"\
80
+ " #{@card_last_digits.inspect}>"
69
81
  end
70
82
  end
71
83
  end