apimatic-stax-sdk 0.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.
Files changed (99) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +28 -0
  3. data/README.md +189 -0
  4. data/bin/console +15 -0
  5. data/lib/stax_fatt_merchant_api/api_helper.rb +10 -0
  6. data/lib/stax_fatt_merchant_api/apis/base_api.rb +67 -0
  7. data/lib/stax_fatt_merchant_api/apis/cache_api.rb +28 -0
  8. data/lib/stax_fatt_merchant_api/apis/charge_api.rb +29 -0
  9. data/lib/stax_fatt_merchant_api/apis/credit_api.rb +29 -0
  10. data/lib/stax_fatt_merchant_api/apis/customer_api.rb +307 -0
  11. data/lib/stax_fatt_merchant_api/apis/dispute_file_api.rb +46 -0
  12. data/lib/stax_fatt_merchant_api/apis/file_api.rb +115 -0
  13. data/lib/stax_fatt_merchant_api/apis/hello_sign_api.rb +103 -0
  14. data/lib/stax_fatt_merchant_api/apis/integration_api.rb +115 -0
  15. data/lib/stax_fatt_merchant_api/apis/invoice_api.rb +270 -0
  16. data/lib/stax_fatt_merchant_api/apis/invoice_schedule_api.rb +105 -0
  17. data/lib/stax_fatt_merchant_api/apis/item_api.rb +257 -0
  18. data/lib/stax_fatt_merchant_api/apis/merchant_admin_api.rb +323 -0
  19. data/lib/stax_fatt_merchant_api/apis/payment_method_api.rb +128 -0
  20. data/lib/stax_fatt_merchant_api/apis/reporting_api.rb +42 -0
  21. data/lib/stax_fatt_merchant_api/apis/sandbox_api.rb +45 -0
  22. data/lib/stax_fatt_merchant_api/apis/self_api.rb +186 -0
  23. data/lib/stax_fatt_merchant_api/apis/team_api.rb +143 -0
  24. data/lib/stax_fatt_merchant_api/apis/team_api_keys_api.rb +141 -0
  25. data/lib/stax_fatt_merchant_api/apis/team_funding_accounts_api.rb +175 -0
  26. data/lib/stax_fatt_merchant_api/apis/team_options_api.rb +141 -0
  27. data/lib/stax_fatt_merchant_api/apis/team_registration_api.rb +156 -0
  28. data/lib/stax_fatt_merchant_api/apis/team_users_api.rb +139 -0
  29. data/lib/stax_fatt_merchant_api/apis/terminal_api.rb +73 -0
  30. data/lib/stax_fatt_merchant_api/apis/transaction_api.rb +467 -0
  31. data/lib/stax_fatt_merchant_api/apis/user_admin_api.rb +161 -0
  32. data/lib/stax_fatt_merchant_api/apis/verify_api.rb +42 -0
  33. data/lib/stax_fatt_merchant_api/apis/web_payment_api.rb +28 -0
  34. data/lib/stax_fatt_merchant_api/apis/webhook_api.rb +98 -0
  35. data/lib/stax_fatt_merchant_api/client.rb +235 -0
  36. data/lib/stax_fatt_merchant_api/configuration.rb +179 -0
  37. data/lib/stax_fatt_merchant_api/exceptions/api_exception.rb +21 -0
  38. data/lib/stax_fatt_merchant_api/http/api_response.rb +19 -0
  39. data/lib/stax_fatt_merchant_api/http/auth/oauth_2.rb +53 -0
  40. data/lib/stax_fatt_merchant_api/http/http_call_back.rb +10 -0
  41. data/lib/stax_fatt_merchant_api/http/http_method_enum.rb +10 -0
  42. data/lib/stax_fatt_merchant_api/http/http_request.rb +10 -0
  43. data/lib/stax_fatt_merchant_api/http/http_response.rb +10 -0
  44. data/lib/stax_fatt_merchant_api/http/proxy_settings.rb +22 -0
  45. data/lib/stax_fatt_merchant_api/logging/configuration/api_logging_configuration.rb +186 -0
  46. data/lib/stax_fatt_merchant_api/logging/sdk_logger.rb +17 -0
  47. data/lib/stax_fatt_merchant_api/models/base_model.rb +110 -0
  48. data/lib/stax_fatt_merchant_api/models/delete_customer_bulk_request_body_json.rb +74 -0
  49. data/lib/stax_fatt_merchant_api/models/delete_item_bulk_request_body_json.rb +74 -0
  50. data/lib/stax_fatt_merchant_api/models/get_ephemeral_token_response200_json.rb +75 -0
  51. data/lib/stax_fatt_merchant_api/models/get_ephemeral_token_root_response200_json.rb +75 -0
  52. data/lib/stax_fatt_merchant_api/models/merge_customer_request_body_json.rb +76 -0
  53. data/lib/stax_fatt_merchant_api/models/post_cache_test_request_body_json.rb +74 -0
  54. data/lib/stax_fatt_merchant_api/models/post_capture_request_body_json.rb +75 -0
  55. data/lib/stax_fatt_merchant_api/models/post_credit_request_body_json.rb +96 -0
  56. data/lib/stax_fatt_merchant_api/models/post_dispute_file_request_body.rb +74 -0
  57. data/lib/stax_fatt_merchant_api/models/post_email_receipt_request_body_json.rb +75 -0
  58. data/lib/stax_fatt_merchant_api/models/post_file_request_body.rb +85 -0
  59. data/lib/stax_fatt_merchant_api/models/post_invoice_manual_payment_method.rb +52 -0
  60. data/lib/stax_fatt_merchant_api/models/post_invoice_manual_payment_request_body_json.rb +75 -0
  61. data/lib/stax_fatt_merchant_api/models/post_invoice_payment_request_body_json.rb +87 -0
  62. data/lib/stax_fatt_merchant_api/models/post_item_thumbnail_request_body.rb +74 -0
  63. data/lib/stax_fatt_merchant_api/models/post_payment_method_token_request_body_json.rb +85 -0
  64. data/lib/stax_fatt_merchant_api/models/post_receipt_method.rb +36 -0
  65. data/lib/stax_fatt_merchant_api/models/post_refund_request_body_json.rb +75 -0
  66. data/lib/stax_fatt_merchant_api/models/post_send_later_method.rb +36 -0
  67. data/lib/stax_fatt_merchant_api/models/post_send_later_request_body_json.rb +84 -0
  68. data/lib/stax_fatt_merchant_api/models/post_sms_receipt_request_body_json.rb +75 -0
  69. data/lib/stax_fatt_merchant_api/models/post_team_branding_request_body.rb +74 -0
  70. data/lib/stax_fatt_merchant_api/models/post_team_funding_account_file_request_body.rb +74 -0
  71. data/lib/stax_fatt_merchant_api/models/post_team_registration_file_request_body.rb +74 -0
  72. data/lib/stax_fatt_merchant_api/models/post_terminal_signature_request_body_json.rb +87 -0
  73. data/lib/stax_fatt_merchant_api/models/post_verification_request_body_json.rb +77 -0
  74. data/lib/stax_fatt_merchant_api/models/post_void_or_refund_request_body_json.rb +75 -0
  75. data/lib/stax_fatt_merchant_api/models/put_email_receipt_request_body_json.rb +75 -0
  76. data/lib/stax_fatt_merchant_api/models/put_notify_email_request_body_json.rb +75 -0
  77. data/lib/stax_fatt_merchant_api/models/put_publish_bulk_request_body_json.rb +74 -0
  78. data/lib/stax_fatt_merchant_api/models/put_receipt_bulk_method_method.rb +36 -0
  79. data/lib/stax_fatt_merchant_api/models/put_receipt_bulk_method_request_body_json.rb +77 -0
  80. data/lib/stax_fatt_merchant_api/models/put_receipt_bulk_request_body_json.rb +77 -0
  81. data/lib/stax_fatt_merchant_api/models/put_receipt_method.rb +36 -0
  82. data/lib/stax_fatt_merchant_api/models/put_receipt_request_body_json.rb +85 -0
  83. data/lib/stax_fatt_merchant_api/models/put_registration_sign_request_body_json.rb +76 -0
  84. data/lib/stax_fatt_merchant_api/models/put_restore_customer_bulk_request_body_json.rb +74 -0
  85. data/lib/stax_fatt_merchant_api/models/put_send_invoice_bulk_method.rb +36 -0
  86. data/lib/stax_fatt_merchant_api/models/put_send_invoice_bulk_request_body_json.rb +76 -0
  87. data/lib/stax_fatt_merchant_api/models/put_send_invoice_method.rb +36 -0
  88. data/lib/stax_fatt_merchant_api/models/put_set_default_merchant_request_body_json.rb +76 -0
  89. data/lib/stax_fatt_merchant_api/models/put_set_plan_request_body_json.rb +74 -0
  90. data/lib/stax_fatt_merchant_api/models/put_sms_receipt_request_body_json.rb +75 -0
  91. data/lib/stax_fatt_merchant_api/models/put_team_registration_file_request_body.rb +74 -0
  92. data/lib/stax_fatt_merchant_api/models/put_terminal_signature_request_body_json.rb +76 -0
  93. data/lib/stax_fatt_merchant_api/models/put_transaction_request_body_json.rb +74 -0
  94. data/lib/stax_fatt_merchant_api/models/put_unpublish_bulk_request_body_json.rb +74 -0
  95. data/lib/stax_fatt_merchant_api/models/put_verify_integration_token_request_body_json.rb +75 -0
  96. data/lib/stax_fatt_merchant_api/utilities/date_time_helper.rb +11 -0
  97. data/lib/stax_fatt_merchant_api/utilities/file_wrapper.rb +28 -0
  98. data/lib/stax_fatt_merchant_api.rb +154 -0
  99. metadata +182 -0
@@ -0,0 +1,74 @@
1
+ # stax_fatt_merchant_api
2
+ #
3
+ # This file was automatically generated by APIMATIC
4
+ # v3.0 ( https://www.apimatic.io ).
5
+
6
+ module StaxFattMerchantApi
7
+ # PostTeamRegistrationFileRequestBody Model.
8
+ class PostTeamRegistrationFileRequestBody < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [Binary]
14
+ attr_accessor :file
15
+
16
+ # A mapping from model property names to API property names.
17
+ def self.names
18
+ @_hash = {} if @_hash.nil?
19
+ @_hash['file'] = 'file'
20
+ @_hash
21
+ end
22
+
23
+ # An array for optional fields
24
+ def self.optionals
25
+ %w[
26
+ file
27
+ ]
28
+ end
29
+
30
+ # An array for nullable fields
31
+ def self.nullables
32
+ []
33
+ end
34
+
35
+ def initialize(file: SKIP, additional_properties: nil)
36
+ # Add additional model properties to the instance
37
+ additional_properties = {} if additional_properties.nil?
38
+
39
+ @file = file unless file == SKIP
40
+ @additional_properties = additional_properties
41
+ end
42
+
43
+ # Creates an instance of the object from a hash.
44
+ def self.from_hash(hash)
45
+ return nil unless hash
46
+
47
+ # Extract variables from the hash.
48
+ file = hash.key?('file') ? hash['file'] : SKIP
49
+
50
+ # Create a new hash for additional properties, removing known properties.
51
+ new_hash = hash.reject { |k, _| names.value?(k) }
52
+
53
+ additional_properties = APIHelper.get_additional_properties(
54
+ new_hash, proc { |value| value }
55
+ )
56
+
57
+ # Create object from extracted values.
58
+ PostTeamRegistrationFileRequestBody.new(file: file,
59
+ additional_properties: additional_properties)
60
+ end
61
+
62
+ # Provides a human-readable string representation of the object.
63
+ def to_s
64
+ class_name = self.class.name.split('::').last
65
+ "<#{class_name} file: #{@file}, additional_properties: #{@additional_properties}>"
66
+ end
67
+
68
+ # Provides a debugging-friendly string with detailed object information.
69
+ def inspect
70
+ class_name = self.class.name.split('::').last
71
+ "<#{class_name} file: #{@file.inspect}, additional_properties: #{@additional_properties}>"
72
+ end
73
+ end
74
+ end
@@ -0,0 +1,87 @@
1
+ # stax_fatt_merchant_api
2
+ #
3
+ # This file was automatically generated by APIMATIC
4
+ # v3.0 ( https://www.apimatic.io ).
5
+
6
+ module StaxFattMerchantApi
7
+ # PostTerminalSignatureRequestBodyJson Model.
8
+ class PostTerminalSignatureRequestBodyJson < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_accessor :signature
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [UUID | String]
18
+ attr_accessor :transaction_id
19
+
20
+ # A mapping from model property names to API property names.
21
+ def self.names
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['signature'] = 'signature'
24
+ @_hash['transaction_id'] = 'transaction_id'
25
+ @_hash
26
+ end
27
+
28
+ # An array for optional fields
29
+ def self.optionals
30
+ %w[
31
+ signature
32
+ transaction_id
33
+ ]
34
+ end
35
+
36
+ # An array for nullable fields
37
+ def self.nullables
38
+ []
39
+ end
40
+
41
+ def initialize(signature: SKIP, transaction_id: SKIP,
42
+ additional_properties: nil)
43
+ # Add additional model properties to the instance
44
+ additional_properties = {} if additional_properties.nil?
45
+
46
+ @signature = signature unless signature == SKIP
47
+ @transaction_id = transaction_id unless transaction_id == SKIP
48
+ @additional_properties = additional_properties
49
+ end
50
+
51
+ # Creates an instance of the object from a hash.
52
+ def self.from_hash(hash)
53
+ return nil unless hash
54
+
55
+ # Extract variables from the hash.
56
+ signature = hash.key?('signature') ? hash['signature'] : SKIP
57
+ transaction_id =
58
+ hash.key?('transaction_id') ? hash['transaction_id'] : SKIP
59
+
60
+ # Create a new hash for additional properties, removing known properties.
61
+ new_hash = hash.reject { |k, _| names.value?(k) }
62
+
63
+ additional_properties = APIHelper.get_additional_properties(
64
+ new_hash, proc { |value| value }
65
+ )
66
+
67
+ # Create object from extracted values.
68
+ PostTerminalSignatureRequestBodyJson.new(signature: signature,
69
+ transaction_id: transaction_id,
70
+ additional_properties: additional_properties)
71
+ end
72
+
73
+ # Provides a human-readable string representation of the object.
74
+ def to_s
75
+ class_name = self.class.name.split('::').last
76
+ "<#{class_name} signature: #{@signature}, transaction_id: #{@transaction_id},"\
77
+ " additional_properties: #{@additional_properties}>"
78
+ end
79
+
80
+ # Provides a debugging-friendly string with detailed object information.
81
+ def inspect
82
+ class_name = self.class.name.split('::').last
83
+ "<#{class_name} signature: #{@signature.inspect}, transaction_id:"\
84
+ " #{@transaction_id.inspect}, additional_properties: #{@additional_properties}>"
85
+ end
86
+ end
87
+ end
@@ -0,0 +1,77 @@
1
+ # stax_fatt_merchant_api
2
+ #
3
+ # This file was automatically generated by APIMATIC
4
+ # v3.0 ( https://www.apimatic.io ).
5
+
6
+ module StaxFattMerchantApi
7
+ # PostVerificationRequestBodyJson Model.
8
+ class PostVerificationRequestBodyJson < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [UUID | String]
14
+ attr_accessor :payment_method_id
15
+
16
+ # A mapping from model property names to API property names.
17
+ def self.names
18
+ @_hash = {} if @_hash.nil?
19
+ @_hash['payment_method_id'] = 'payment_method_id'
20
+ @_hash
21
+ end
22
+
23
+ # An array for optional fields
24
+ def self.optionals
25
+ %w[
26
+ payment_method_id
27
+ ]
28
+ end
29
+
30
+ # An array for nullable fields
31
+ def self.nullables
32
+ []
33
+ end
34
+
35
+ def initialize(payment_method_id: SKIP, additional_properties: nil)
36
+ # Add additional model properties to the instance
37
+ additional_properties = {} if additional_properties.nil?
38
+
39
+ @payment_method_id = payment_method_id unless payment_method_id == SKIP
40
+ @additional_properties = additional_properties
41
+ end
42
+
43
+ # Creates an instance of the object from a hash.
44
+ def self.from_hash(hash)
45
+ return nil unless hash
46
+
47
+ # Extract variables from the hash.
48
+ payment_method_id =
49
+ hash.key?('payment_method_id') ? hash['payment_method_id'] : SKIP
50
+
51
+ # Create a new hash for additional properties, removing known properties.
52
+ new_hash = hash.reject { |k, _| names.value?(k) }
53
+
54
+ additional_properties = APIHelper.get_additional_properties(
55
+ new_hash, proc { |value| value }
56
+ )
57
+
58
+ # Create object from extracted values.
59
+ PostVerificationRequestBodyJson.new(payment_method_id: payment_method_id,
60
+ additional_properties: additional_properties)
61
+ end
62
+
63
+ # Provides a human-readable string representation of the object.
64
+ def to_s
65
+ class_name = self.class.name.split('::').last
66
+ "<#{class_name} payment_method_id: #{@payment_method_id}, additional_properties:"\
67
+ " #{@additional_properties}>"
68
+ end
69
+
70
+ # Provides a debugging-friendly string with detailed object information.
71
+ def inspect
72
+ class_name = self.class.name.split('::').last
73
+ "<#{class_name} payment_method_id: #{@payment_method_id.inspect}, additional_properties:"\
74
+ " #{@additional_properties}>"
75
+ end
76
+ end
77
+ end
@@ -0,0 +1,75 @@
1
+ # stax_fatt_merchant_api
2
+ #
3
+ # This file was automatically generated by APIMATIC
4
+ # v3.0 ( https://www.apimatic.io ).
5
+
6
+ module StaxFattMerchantApi
7
+ # PostVoidOrRefundRequestBodyJson Model.
8
+ class PostVoidOrRefundRequestBodyJson < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [Float]
14
+ attr_accessor :total
15
+
16
+ # A mapping from model property names to API property names.
17
+ def self.names
18
+ @_hash = {} if @_hash.nil?
19
+ @_hash['total'] = 'total'
20
+ @_hash
21
+ end
22
+
23
+ # An array for optional fields
24
+ def self.optionals
25
+ %w[
26
+ total
27
+ ]
28
+ end
29
+
30
+ # An array for nullable fields
31
+ def self.nullables
32
+ []
33
+ end
34
+
35
+ def initialize(total: SKIP, additional_properties: nil)
36
+ # Add additional model properties to the instance
37
+ additional_properties = {} if additional_properties.nil?
38
+
39
+ @total = total unless total == SKIP
40
+ @additional_properties = additional_properties
41
+ end
42
+
43
+ # Creates an instance of the object from a hash.
44
+ def self.from_hash(hash)
45
+ return nil unless hash
46
+
47
+ # Extract variables from the hash.
48
+ total = hash.key?('total') ? hash['total'] : SKIP
49
+
50
+ # Create a new hash for additional properties, removing known properties.
51
+ new_hash = hash.reject { |k, _| names.value?(k) }
52
+
53
+ additional_properties = APIHelper.get_additional_properties(
54
+ new_hash, proc { |value| value }
55
+ )
56
+
57
+ # Create object from extracted values.
58
+ PostVoidOrRefundRequestBodyJson.new(total: total,
59
+ additional_properties: additional_properties)
60
+ end
61
+
62
+ # Provides a human-readable string representation of the object.
63
+ def to_s
64
+ class_name = self.class.name.split('::').last
65
+ "<#{class_name} total: #{@total}, additional_properties: #{@additional_properties}>"
66
+ end
67
+
68
+ # Provides a debugging-friendly string with detailed object information.
69
+ def inspect
70
+ class_name = self.class.name.split('::').last
71
+ "<#{class_name} total: #{@total.inspect}, additional_properties:"\
72
+ " #{@additional_properties}>"
73
+ end
74
+ end
75
+ end
@@ -0,0 +1,75 @@
1
+ # stax_fatt_merchant_api
2
+ #
3
+ # This file was automatically generated by APIMATIC
4
+ # v3.0 ( https://www.apimatic.io ).
5
+
6
+ module StaxFattMerchantApi
7
+ # PutEmailReceiptRequestBodyJson Model.
8
+ class PutEmailReceiptRequestBodyJson < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_accessor :email
15
+
16
+ # A mapping from model property names to API property names.
17
+ def self.names
18
+ @_hash = {} if @_hash.nil?
19
+ @_hash['email'] = 'email'
20
+ @_hash
21
+ end
22
+
23
+ # An array for optional fields
24
+ def self.optionals
25
+ %w[
26
+ email
27
+ ]
28
+ end
29
+
30
+ # An array for nullable fields
31
+ def self.nullables
32
+ []
33
+ end
34
+
35
+ def initialize(email: SKIP, additional_properties: nil)
36
+ # Add additional model properties to the instance
37
+ additional_properties = {} if additional_properties.nil?
38
+
39
+ @email = email unless email == SKIP
40
+ @additional_properties = additional_properties
41
+ end
42
+
43
+ # Creates an instance of the object from a hash.
44
+ def self.from_hash(hash)
45
+ return nil unless hash
46
+
47
+ # Extract variables from the hash.
48
+ email = hash.key?('email') ? hash['email'] : SKIP
49
+
50
+ # Create a new hash for additional properties, removing known properties.
51
+ new_hash = hash.reject { |k, _| names.value?(k) }
52
+
53
+ additional_properties = APIHelper.get_additional_properties(
54
+ new_hash, proc { |value| value }
55
+ )
56
+
57
+ # Create object from extracted values.
58
+ PutEmailReceiptRequestBodyJson.new(email: email,
59
+ additional_properties: additional_properties)
60
+ end
61
+
62
+ # Provides a human-readable string representation of the object.
63
+ def to_s
64
+ class_name = self.class.name.split('::').last
65
+ "<#{class_name} email: #{@email}, additional_properties: #{@additional_properties}>"
66
+ end
67
+
68
+ # Provides a debugging-friendly string with detailed object information.
69
+ def inspect
70
+ class_name = self.class.name.split('::').last
71
+ "<#{class_name} email: #{@email.inspect}, additional_properties:"\
72
+ " #{@additional_properties}>"
73
+ end
74
+ end
75
+ end
@@ -0,0 +1,75 @@
1
+ # stax_fatt_merchant_api
2
+ #
3
+ # This file was automatically generated by APIMATIC
4
+ # v3.0 ( https://www.apimatic.io ).
5
+
6
+ module StaxFattMerchantApi
7
+ # PutNotifyEmailRequestBodyJson Model.
8
+ class PutNotifyEmailRequestBodyJson < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_accessor :email
15
+
16
+ # A mapping from model property names to API property names.
17
+ def self.names
18
+ @_hash = {} if @_hash.nil?
19
+ @_hash['email'] = 'email'
20
+ @_hash
21
+ end
22
+
23
+ # An array for optional fields
24
+ def self.optionals
25
+ %w[
26
+ email
27
+ ]
28
+ end
29
+
30
+ # An array for nullable fields
31
+ def self.nullables
32
+ []
33
+ end
34
+
35
+ def initialize(email: SKIP, additional_properties: nil)
36
+ # Add additional model properties to the instance
37
+ additional_properties = {} if additional_properties.nil?
38
+
39
+ @email = email unless email == SKIP
40
+ @additional_properties = additional_properties
41
+ end
42
+
43
+ # Creates an instance of the object from a hash.
44
+ def self.from_hash(hash)
45
+ return nil unless hash
46
+
47
+ # Extract variables from the hash.
48
+ email = hash.key?('email') ? hash['email'] : SKIP
49
+
50
+ # Create a new hash for additional properties, removing known properties.
51
+ new_hash = hash.reject { |k, _| names.value?(k) }
52
+
53
+ additional_properties = APIHelper.get_additional_properties(
54
+ new_hash, proc { |value| value }
55
+ )
56
+
57
+ # Create object from extracted values.
58
+ PutNotifyEmailRequestBodyJson.new(email: email,
59
+ additional_properties: additional_properties)
60
+ end
61
+
62
+ # Provides a human-readable string representation of the object.
63
+ def to_s
64
+ class_name = self.class.name.split('::').last
65
+ "<#{class_name} email: #{@email}, additional_properties: #{@additional_properties}>"
66
+ end
67
+
68
+ # Provides a debugging-friendly string with detailed object information.
69
+ def inspect
70
+ class_name = self.class.name.split('::').last
71
+ "<#{class_name} email: #{@email.inspect}, additional_properties:"\
72
+ " #{@additional_properties}>"
73
+ end
74
+ end
75
+ end
@@ -0,0 +1,74 @@
1
+ # stax_fatt_merchant_api
2
+ #
3
+ # This file was automatically generated by APIMATIC
4
+ # v3.0 ( https://www.apimatic.io ).
5
+
6
+ module StaxFattMerchantApi
7
+ # PutPublishBulkRequestBodyJson Model.
8
+ class PutPublishBulkRequestBodyJson < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [Array[UUID | String]]
14
+ attr_accessor :ids
15
+
16
+ # A mapping from model property names to API property names.
17
+ def self.names
18
+ @_hash = {} if @_hash.nil?
19
+ @_hash['ids'] = 'ids'
20
+ @_hash
21
+ end
22
+
23
+ # An array for optional fields
24
+ def self.optionals
25
+ %w[
26
+ ids
27
+ ]
28
+ end
29
+
30
+ # An array for nullable fields
31
+ def self.nullables
32
+ []
33
+ end
34
+
35
+ def initialize(ids: SKIP, additional_properties: nil)
36
+ # Add additional model properties to the instance
37
+ additional_properties = {} if additional_properties.nil?
38
+
39
+ @ids = ids unless ids == SKIP
40
+ @additional_properties = additional_properties
41
+ end
42
+
43
+ # Creates an instance of the object from a hash.
44
+ def self.from_hash(hash)
45
+ return nil unless hash
46
+
47
+ # Extract variables from the hash.
48
+ ids = hash.key?('ids') ? hash['ids'] : SKIP
49
+
50
+ # Create a new hash for additional properties, removing known properties.
51
+ new_hash = hash.reject { |k, _| names.value?(k) }
52
+
53
+ additional_properties = APIHelper.get_additional_properties(
54
+ new_hash, proc { |value| value }
55
+ )
56
+
57
+ # Create object from extracted values.
58
+ PutPublishBulkRequestBodyJson.new(ids: ids,
59
+ additional_properties: additional_properties)
60
+ end
61
+
62
+ # Provides a human-readable string representation of the object.
63
+ def to_s
64
+ class_name = self.class.name.split('::').last
65
+ "<#{class_name} ids: #{@ids}, additional_properties: #{@additional_properties}>"
66
+ end
67
+
68
+ # Provides a debugging-friendly string with detailed object information.
69
+ def inspect
70
+ class_name = self.class.name.split('::').last
71
+ "<#{class_name} ids: #{@ids.inspect}, additional_properties: #{@additional_properties}>"
72
+ end
73
+ end
74
+ end
@@ -0,0 +1,36 @@
1
+ # stax_fatt_merchant_api
2
+ #
3
+ # This file was automatically generated by APIMATIC
4
+ # v3.0 ( https://www.apimatic.io ).
5
+
6
+ module StaxFattMerchantApi
7
+ # PutReceiptBulkMethodMethod.
8
+ class PutReceiptBulkMethodMethod
9
+ PUT_RECEIPT_BULK_METHOD_METHOD = [
10
+ # TODO: Write general description for EMAIL
11
+ EMAIL = 'email'.freeze,
12
+
13
+ # TODO: Write general description for SMS
14
+ SMS = 'sms'.freeze
15
+ ].freeze
16
+
17
+ def self.validate(value)
18
+ return false if value.nil?
19
+
20
+ PUT_RECEIPT_BULK_METHOD_METHOD.include?(value)
21
+ end
22
+
23
+ def self.from_value(value, default_value = EMAIL)
24
+ return default_value if value.nil?
25
+
26
+ str = value.to_s.strip
27
+
28
+ case str.downcase
29
+ when 'email' then EMAIL
30
+ when 'sms' then SMS
31
+ else
32
+ default_value
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,77 @@
1
+ # stax_fatt_merchant_api
2
+ #
3
+ # This file was automatically generated by APIMATIC
4
+ # v3.0 ( https://www.apimatic.io ).
5
+
6
+ module StaxFattMerchantApi
7
+ # PutReceiptBulkMethodRequestBodyJson Model.
8
+ class PutReceiptBulkMethodRequestBodyJson < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [Array[UUID | String]]
14
+ attr_accessor :transaction_ids
15
+
16
+ # A mapping from model property names to API property names.
17
+ def self.names
18
+ @_hash = {} if @_hash.nil?
19
+ @_hash['transaction_ids'] = 'transaction_ids'
20
+ @_hash
21
+ end
22
+
23
+ # An array for optional fields
24
+ def self.optionals
25
+ %w[
26
+ transaction_ids
27
+ ]
28
+ end
29
+
30
+ # An array for nullable fields
31
+ def self.nullables
32
+ []
33
+ end
34
+
35
+ def initialize(transaction_ids: SKIP, additional_properties: nil)
36
+ # Add additional model properties to the instance
37
+ additional_properties = {} if additional_properties.nil?
38
+
39
+ @transaction_ids = transaction_ids unless transaction_ids == SKIP
40
+ @additional_properties = additional_properties
41
+ end
42
+
43
+ # Creates an instance of the object from a hash.
44
+ def self.from_hash(hash)
45
+ return nil unless hash
46
+
47
+ # Extract variables from the hash.
48
+ transaction_ids =
49
+ hash.key?('transaction_ids') ? hash['transaction_ids'] : SKIP
50
+
51
+ # Create a new hash for additional properties, removing known properties.
52
+ new_hash = hash.reject { |k, _| names.value?(k) }
53
+
54
+ additional_properties = APIHelper.get_additional_properties(
55
+ new_hash, proc { |value| value }
56
+ )
57
+
58
+ # Create object from extracted values.
59
+ PutReceiptBulkMethodRequestBodyJson.new(transaction_ids: transaction_ids,
60
+ additional_properties: additional_properties)
61
+ end
62
+
63
+ # Provides a human-readable string representation of the object.
64
+ def to_s
65
+ class_name = self.class.name.split('::').last
66
+ "<#{class_name} transaction_ids: #{@transaction_ids}, additional_properties:"\
67
+ " #{@additional_properties}>"
68
+ end
69
+
70
+ # Provides a debugging-friendly string with detailed object information.
71
+ def inspect
72
+ class_name = self.class.name.split('::').last
73
+ "<#{class_name} transaction_ids: #{@transaction_ids.inspect}, additional_properties:"\
74
+ " #{@additional_properties}>"
75
+ end
76
+ end
77
+ end