budgea_client 1.0.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.
- checksums.yaml +7 -0
- data/Gemfile +12 -0
- data/Gemfile.lock +89 -0
- data/README.md +619 -0
- data/Rakefile +13 -0
- data/budgea_client.gemspec +35 -0
- data/docs/Access.md +12 -0
- data/docs/Account.md +25 -0
- data/docs/AccountLog.md +15 -0
- data/docs/AccountType.md +15 -0
- data/docs/AdministrationApi.md +944 -0
- data/docs/Alert.md +15 -0
- data/docs/AuthenticationApi.md +398 -0
- data/docs/Bank.md +18 -0
- data/docs/BankCategory.md +9 -0
- data/docs/BanksApi.md +6558 -0
- data/docs/Category.md +17 -0
- data/docs/Client.md +18 -0
- data/docs/Connection.md +16 -0
- data/docs/ConnectionContact.md +17 -0
- data/docs/ConnectionLog.md +21 -0
- data/docs/ConnectionsApi.md +934 -0
- data/docs/ConnectorLogo.md +11 -0
- data/docs/Currency.md +10 -0
- data/docs/Device.md +14 -0
- data/docs/Document.md +29 -0
- data/docs/DocumentType.md +10 -0
- data/docs/DocumentsApi.md +5228 -0
- data/docs/Field.md +15 -0
- data/docs/File.md +11 -0
- data/docs/Group.md +15 -0
- data/docs/HashTable.md +11 -0
- data/docs/InlineResponse200.md +8 -0
- data/docs/InlineResponse2001.md +9 -0
- data/docs/InlineResponse20010.md +8 -0
- data/docs/InlineResponse20011.md +8 -0
- data/docs/InlineResponse20012.md +8 -0
- data/docs/InlineResponse20013.md +8 -0
- data/docs/InlineResponse20014.md +8 -0
- data/docs/InlineResponse20015.md +8 -0
- data/docs/InlineResponse20016.md +8 -0
- data/docs/InlineResponse20017.md +8 -0
- data/docs/InlineResponse20018.md +8 -0
- data/docs/InlineResponse20019.md +8 -0
- data/docs/InlineResponse2002.md +10 -0
- data/docs/InlineResponse20020.md +8 -0
- data/docs/InlineResponse20021.md +8 -0
- data/docs/InlineResponse20022.md +8 -0
- data/docs/InlineResponse20023.md +8 -0
- data/docs/InlineResponse20024.md +8 -0
- data/docs/InlineResponse20025.md +8 -0
- data/docs/InlineResponse20026.md +8 -0
- data/docs/InlineResponse20027.md +8 -0
- data/docs/InlineResponse20028.md +8 -0
- data/docs/InlineResponse20029.md +8 -0
- data/docs/InlineResponse2003.md +10 -0
- data/docs/InlineResponse20030.md +8 -0
- data/docs/InlineResponse20031.md +8 -0
- data/docs/InlineResponse20032.md +8 -0
- data/docs/InlineResponse20033.md +8 -0
- data/docs/InlineResponse2004.md +12 -0
- data/docs/InlineResponse2005.md +9 -0
- data/docs/InlineResponse2006.md +10 -0
- data/docs/InlineResponse2007.md +8 -0
- data/docs/InlineResponse2008.md +8 -0
- data/docs/InlineResponse2009.md +8 -0
- data/docs/Investment.md +32 -0
- data/docs/InvestmentValue.md +13 -0
- data/docs/Invite.md +13 -0
- data/docs/LockedUser.md +10 -0
- data/docs/OCRApi.md +117 -0
- data/docs/OIDCApi.md +167 -0
- data/docs/OidcWhitelist.md +9 -0
- data/docs/PFMApi.md +2204 -0
- data/docs/Pocket.md +17 -0
- data/docs/Profile.md +15 -0
- data/docs/Project.md +16 -0
- data/docs/ProjectType.md +10 -0
- data/docs/ProvidersApi.md +7014 -0
- data/docs/Recipient.md +22 -0
- data/docs/RecipientsApi.md +244 -0
- data/docs/Security.md +12 -0
- data/docs/Subscription.md +18 -0
- data/docs/TermsApi.md +218 -0
- data/docs/TermsOfService.md +12 -0
- data/docs/Transaction.md +33 -0
- data/docs/TransactionInformation.md +11 -0
- data/docs/TransactionsCluster.md +16 -0
- data/docs/Transfer.md +23 -0
- data/docs/TransfersApi.md +2404 -0
- data/docs/User.md +10 -0
- data/docs/UserAlert.md +21 -0
- data/docs/UsersManagementApi.md +608 -0
- data/docs/WealthApi.md +828 -0
- data/docs/Webhook.md +15 -0
- data/git_push.sh +55 -0
- data/lib/budgea_client.rb +118 -0
- data/lib/budgea_client/api/administration_api.rb +1059 -0
- data/lib/budgea_client/api/authentication_api.rb +467 -0
- data/lib/budgea_client/api/banks_api.rb +7837 -0
- data/lib/budgea_client/api/connections_api.rb +1088 -0
- data/lib/budgea_client/api/documents_api.rb +6637 -0
- data/lib/budgea_client/api/ocr_api.rb +141 -0
- data/lib/budgea_client/api/oidc_api.rb +195 -0
- data/lib/budgea_client/api/pfm_api.rb +2630 -0
- data/lib/budgea_client/api/providers_api.rb +8694 -0
- data/lib/budgea_client/api/recipients_api.rb +293 -0
- data/lib/budgea_client/api/terms_api.rb +245 -0
- data/lib/budgea_client/api/transfers_api.rb +2941 -0
- data/lib/budgea_client/api/users_management_api.rb +695 -0
- data/lib/budgea_client/api/wealth_api.rb +994 -0
- data/lib/budgea_client/api_client.rb +378 -0
- data/lib/budgea_client/api_error.rb +28 -0
- data/lib/budgea_client/configuration.rb +192 -0
- data/lib/budgea_client/models/access.rb +224 -0
- data/lib/budgea_client/models/account.rb +383 -0
- data/lib/budgea_client/models/account_log.rb +266 -0
- data/lib/budgea_client/models/account_type.rb +281 -0
- data/lib/budgea_client/models/alert.rb +273 -0
- data/lib/budgea_client/models/bank.rb +308 -0
- data/lib/budgea_client/models/bank_category.rb +201 -0
- data/lib/budgea_client/models/category.rb +299 -0
- data/lib/budgea_client/models/client.rb +305 -0
- data/lib/budgea_client/models/connection.rb +276 -0
- data/lib/budgea_client/models/connection_contact.rb +274 -0
- data/lib/budgea_client/models/connection_log.rb +324 -0
- data/lib/budgea_client/models/connector_logo.rb +223 -0
- data/lib/budgea_client/models/currency.rb +216 -0
- data/lib/budgea_client/models/device.rb +269 -0
- data/lib/budgea_client/models/document.rb +398 -0
- data/lib/budgea_client/models/document_type.rb +213 -0
- data/lib/budgea_client/models/field.rb +273 -0
- data/lib/budgea_client/models/file.rb +225 -0
- data/lib/budgea_client/models/group.rb +246 -0
- data/lib/budgea_client/models/hash_table.rb +227 -0
- data/lib/budgea_client/models/inline_response_200.rb +185 -0
- data/lib/budgea_client/models/inline_response_200_1.rb +199 -0
- data/lib/budgea_client/models/inline_response_200_10.rb +185 -0
- data/lib/budgea_client/models/inline_response_200_11.rb +185 -0
- data/lib/budgea_client/models/inline_response_200_12.rb +185 -0
- data/lib/budgea_client/models/inline_response_200_13.rb +185 -0
- data/lib/budgea_client/models/inline_response_200_14.rb +185 -0
- data/lib/budgea_client/models/inline_response_200_15.rb +185 -0
- data/lib/budgea_client/models/inline_response_200_16.rb +185 -0
- data/lib/budgea_client/models/inline_response_200_17.rb +185 -0
- data/lib/budgea_client/models/inline_response_200_18.rb +185 -0
- data/lib/budgea_client/models/inline_response_200_19.rb +185 -0
- data/lib/budgea_client/models/inline_response_200_2.rb +209 -0
- data/lib/budgea_client/models/inline_response_200_20.rb +185 -0
- data/lib/budgea_client/models/inline_response_200_21.rb +185 -0
- data/lib/budgea_client/models/inline_response_200_22.rb +185 -0
- data/lib/budgea_client/models/inline_response_200_23.rb +185 -0
- data/lib/budgea_client/models/inline_response_200_24.rb +185 -0
- data/lib/budgea_client/models/inline_response_200_25.rb +185 -0
- data/lib/budgea_client/models/inline_response_200_26.rb +185 -0
- data/lib/budgea_client/models/inline_response_200_27.rb +185 -0
- data/lib/budgea_client/models/inline_response_200_28.rb +185 -0
- data/lib/budgea_client/models/inline_response_200_29.rb +185 -0
- data/lib/budgea_client/models/inline_response_200_3.rb +214 -0
- data/lib/budgea_client/models/inline_response_200_30.rb +185 -0
- data/lib/budgea_client/models/inline_response_200_31.rb +185 -0
- data/lib/budgea_client/models/inline_response_200_32.rb +185 -0
- data/lib/budgea_client/models/inline_response_200_33.rb +185 -0
- data/lib/budgea_client/models/inline_response_200_4.rb +239 -0
- data/lib/budgea_client/models/inline_response_200_5.rb +199 -0
- data/lib/budgea_client/models/inline_response_200_6.rb +214 -0
- data/lib/budgea_client/models/inline_response_200_7.rb +185 -0
- data/lib/budgea_client/models/inline_response_200_8.rb +185 -0
- data/lib/budgea_client/models/inline_response_200_9.rb +185 -0
- data/lib/budgea_client/models/investment.rb +449 -0
- data/lib/budgea_client/models/investment_value.rb +249 -0
- data/lib/budgea_client/models/invite.rb +233 -0
- data/lib/budgea_client/models/locked_user.rb +206 -0
- data/lib/budgea_client/models/oidc_whitelist.rb +198 -0
- data/lib/budgea_client/models/pocket.rb +298 -0
- data/lib/budgea_client/models/profile.rb +308 -0
- data/lib/budgea_client/models/project.rb +301 -0
- data/lib/budgea_client/models/project_type.rb +206 -0
- data/lib/budgea_client/models/recipient.rb +343 -0
- data/lib/budgea_client/models/security.rb +229 -0
- data/lib/budgea_client/models/subscription.rb +299 -0
- data/lib/budgea_client/models/terms_of_service.rb +229 -0
- data/lib/budgea_client/models/transaction.rb +507 -0
- data/lib/budgea_client/models/transaction_information.rb +224 -0
- data/lib/budgea_client/models/transactions_cluster.rb +277 -0
- data/lib/budgea_client/models/transfer.rb +354 -0
- data/lib/budgea_client/models/user.rb +244 -0
- data/lib/budgea_client/models/user_alert.rb +333 -0
- data/lib/budgea_client/models/webhook.rb +264 -0
- data/lib/budgea_client/version.rb +5 -0
- data/pkg/budgea_client-1.0.0.gem +0 -0
- data/spec/api/administration_api_spec.rb +271 -0
- data/spec/api/authentication_api_spec.rb +126 -0
- data/spec/api/banks_api_spec.rb +1787 -0
- data/spec/api/connections_api_spec.rb +279 -0
- data/spec/api/documents_api_spec.rb +1557 -0
- data/spec/api/ocr_api_spec.rb +54 -0
- data/spec/api/oidc_api_spec.rb +65 -0
- data/spec/api/pfm_api_spec.rb +613 -0
- data/spec/api/providers_api_spec.rb +2029 -0
- data/spec/api/recipients_api_spec.rb +89 -0
- data/spec/api/terms_api_spec.rb +79 -0
- data/spec/api/transfers_api_spec.rb +661 -0
- data/spec/api/users_management_api_spec.rb +177 -0
- data/spec/api/wealth_api_spec.rb +246 -0
- data/spec/api_client_spec.rb +216 -0
- data/spec/configuration_spec.rb +32 -0
- data/spec/models/access_spec.rb +56 -0
- data/spec/models/account_log_spec.rb +74 -0
- data/spec/models/account_spec.rb +134 -0
- data/spec/models/account_type_spec.rb +74 -0
- data/spec/models/alert_spec.rb +74 -0
- data/spec/models/bank_category_spec.rb +38 -0
- data/spec/models/bank_spec.rb +92 -0
- data/spec/models/category_spec.rb +86 -0
- data/spec/models/client_spec.rb +92 -0
- data/spec/models/connection_contact_spec.rb +86 -0
- data/spec/models/connection_log_spec.rb +110 -0
- data/spec/models/connection_spec.rb +80 -0
- data/spec/models/connector_logo_spec.rb +50 -0
- data/spec/models/currency_spec.rb +44 -0
- data/spec/models/device_spec.rb +68 -0
- data/spec/models/document_spec.rb +158 -0
- data/spec/models/document_type_spec.rb +44 -0
- data/spec/models/field_spec.rb +74 -0
- data/spec/models/file_spec.rb +50 -0
- data/spec/models/group_spec.rb +74 -0
- data/spec/models/hash_table_spec.rb +50 -0
- data/spec/models/inline_response_200_10_spec.rb +32 -0
- data/spec/models/inline_response_200_11_spec.rb +32 -0
- data/spec/models/inline_response_200_12_spec.rb +32 -0
- data/spec/models/inline_response_200_13_spec.rb +32 -0
- data/spec/models/inline_response_200_14_spec.rb +32 -0
- data/spec/models/inline_response_200_15_spec.rb +32 -0
- data/spec/models/inline_response_200_16_spec.rb +32 -0
- data/spec/models/inline_response_200_17_spec.rb +32 -0
- data/spec/models/inline_response_200_18_spec.rb +32 -0
- data/spec/models/inline_response_200_19_spec.rb +32 -0
- data/spec/models/inline_response_200_1_spec.rb +38 -0
- data/spec/models/inline_response_200_20_spec.rb +32 -0
- data/spec/models/inline_response_200_21_spec.rb +32 -0
- data/spec/models/inline_response_200_22_spec.rb +32 -0
- data/spec/models/inline_response_200_23_spec.rb +32 -0
- data/spec/models/inline_response_200_24_spec.rb +32 -0
- data/spec/models/inline_response_200_25_spec.rb +32 -0
- data/spec/models/inline_response_200_26_spec.rb +32 -0
- data/spec/models/inline_response_200_27_spec.rb +32 -0
- data/spec/models/inline_response_200_28_spec.rb +32 -0
- data/spec/models/inline_response_200_29_spec.rb +32 -0
- data/spec/models/inline_response_200_2_spec.rb +44 -0
- data/spec/models/inline_response_200_30_spec.rb +32 -0
- data/spec/models/inline_response_200_31_spec.rb +32 -0
- data/spec/models/inline_response_200_32_spec.rb +32 -0
- data/spec/models/inline_response_200_33_spec.rb +32 -0
- data/spec/models/inline_response_200_3_spec.rb +44 -0
- data/spec/models/inline_response_200_4_spec.rb +56 -0
- data/spec/models/inline_response_200_5_spec.rb +38 -0
- data/spec/models/inline_response_200_6_spec.rb +44 -0
- data/spec/models/inline_response_200_7_spec.rb +32 -0
- data/spec/models/inline_response_200_8_spec.rb +32 -0
- data/spec/models/inline_response_200_9_spec.rb +32 -0
- data/spec/models/inline_response_200_spec.rb +32 -0
- data/spec/models/investment_spec.rb +176 -0
- data/spec/models/investment_value_spec.rb +62 -0
- data/spec/models/invite_spec.rb +62 -0
- data/spec/models/locked_user_spec.rb +44 -0
- data/spec/models/oidc_whitelist_spec.rb +38 -0
- data/spec/models/pocket_spec.rb +86 -0
- data/spec/models/profile_spec.rb +78 -0
- data/spec/models/project_spec.rb +80 -0
- data/spec/models/project_type_spec.rb +44 -0
- data/spec/models/recipient_spec.rb +116 -0
- data/spec/models/security_spec.rb +56 -0
- data/spec/models/subscription_spec.rb +92 -0
- data/spec/models/terms_of_service_spec.rb +56 -0
- data/spec/models/transaction_information_spec.rb +50 -0
- data/spec/models/transaction_spec.rb +182 -0
- data/spec/models/transactions_cluster_spec.rb +80 -0
- data/spec/models/transfer_spec.rb +122 -0
- data/spec/models/user_alert_spec.rb +110 -0
- data/spec/models/user_spec.rb +48 -0
- data/spec/models/webhook_spec.rb +74 -0
- data/spec/spec_helper.rb +51 -0
- metadata +599 -0
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'date'
|
|
4
|
+
|
|
5
|
+
module BudgeaClient
|
|
6
|
+
# This is a representation of a transfer.
|
|
7
|
+
class Transfer
|
|
8
|
+
# ID of transfer
|
|
9
|
+
attr_accessor :id
|
|
10
|
+
|
|
11
|
+
# ID of the debited account
|
|
12
|
+
attr_accessor :id_account
|
|
13
|
+
|
|
14
|
+
# ID of the recipient
|
|
15
|
+
attr_accessor :id_recipient
|
|
16
|
+
|
|
17
|
+
# IBAN of the debited account
|
|
18
|
+
attr_accessor :account_iban
|
|
19
|
+
|
|
20
|
+
# IBAN of the recipient
|
|
21
|
+
attr_accessor :recipient_iban
|
|
22
|
+
|
|
23
|
+
# Date when the transfer will be operated by the bank
|
|
24
|
+
attr_accessor :exec_date
|
|
25
|
+
|
|
26
|
+
# Date when the transfer has been registered
|
|
27
|
+
attr_accessor :register_date
|
|
28
|
+
|
|
29
|
+
# Amount of the transfer
|
|
30
|
+
attr_accessor :amount
|
|
31
|
+
|
|
32
|
+
# Fees taken by the bank
|
|
33
|
+
attr_accessor :fees
|
|
34
|
+
|
|
35
|
+
# WebID of the transfer
|
|
36
|
+
attr_accessor :webid
|
|
37
|
+
|
|
38
|
+
# State of the transfer (created, scheduled, validating, pending, done, canceled, error, bug)
|
|
39
|
+
attr_accessor :state
|
|
40
|
+
|
|
41
|
+
# Error message during transfer, if any
|
|
42
|
+
attr_accessor :error
|
|
43
|
+
|
|
44
|
+
# Label of the transfer
|
|
45
|
+
attr_accessor :label
|
|
46
|
+
|
|
47
|
+
# Balance of the account just before the transfer
|
|
48
|
+
attr_accessor :account_balance
|
|
49
|
+
|
|
50
|
+
# If found, ID of the related transaction
|
|
51
|
+
attr_accessor :id_transaction
|
|
52
|
+
|
|
53
|
+
# Currency of the object
|
|
54
|
+
attr_accessor :currency
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
58
|
+
def self.attribute_map
|
|
59
|
+
{
|
|
60
|
+
:'id' => :'id',
|
|
61
|
+
:'id_account' => :'id_account',
|
|
62
|
+
:'id_recipient' => :'id_recipient',
|
|
63
|
+
:'account_iban' => :'account_iban',
|
|
64
|
+
:'recipient_iban' => :'recipient_iban',
|
|
65
|
+
:'exec_date' => :'exec_date',
|
|
66
|
+
:'register_date' => :'register_date',
|
|
67
|
+
:'amount' => :'amount',
|
|
68
|
+
:'fees' => :'fees',
|
|
69
|
+
:'webid' => :'webid',
|
|
70
|
+
:'state' => :'state',
|
|
71
|
+
:'error' => :'error',
|
|
72
|
+
:'label' => :'label',
|
|
73
|
+
:'account_balance' => :'account_balance',
|
|
74
|
+
:'id_transaction' => :'id_transaction',
|
|
75
|
+
:'currency' => :'currency'
|
|
76
|
+
}
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Attribute type mapping.
|
|
80
|
+
def self.swagger_types
|
|
81
|
+
{
|
|
82
|
+
:'id' => :'Integer',
|
|
83
|
+
:'id_account' => :'Integer',
|
|
84
|
+
:'id_recipient' => :'Integer',
|
|
85
|
+
:'account_iban' => :'String',
|
|
86
|
+
:'recipient_iban' => :'String',
|
|
87
|
+
:'exec_date' => :'Date',
|
|
88
|
+
:'register_date' => :'DateTime',
|
|
89
|
+
:'amount' => :'Float',
|
|
90
|
+
:'fees' => :'Float',
|
|
91
|
+
:'webid' => :'String',
|
|
92
|
+
:'state' => :'String',
|
|
93
|
+
:'error' => :'String',
|
|
94
|
+
:'label' => :'String',
|
|
95
|
+
:'account_balance' => :'Float',
|
|
96
|
+
:'id_transaction' => :'Integer',
|
|
97
|
+
:'currency' => :'Object'
|
|
98
|
+
}
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Initializes the object
|
|
102
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
103
|
+
def initialize(attributes = {})
|
|
104
|
+
return unless attributes.is_a?(Hash)
|
|
105
|
+
|
|
106
|
+
# convert string to symbol for hash key
|
|
107
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
108
|
+
|
|
109
|
+
if attributes.has_key?(:'id')
|
|
110
|
+
self.id = attributes[:'id']
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
if attributes.has_key?(:'id_account')
|
|
114
|
+
self.id_account = attributes[:'id_account']
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
if attributes.has_key?(:'id_recipient')
|
|
118
|
+
self.id_recipient = attributes[:'id_recipient']
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
if attributes.has_key?(:'account_iban')
|
|
122
|
+
self.account_iban = attributes[:'account_iban']
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
if attributes.has_key?(:'recipient_iban')
|
|
126
|
+
self.recipient_iban = attributes[:'recipient_iban']
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
if attributes.has_key?(:'exec_date')
|
|
130
|
+
self.exec_date = attributes[:'exec_date']
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
if attributes.has_key?(:'register_date')
|
|
134
|
+
self.register_date = attributes[:'register_date']
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
if attributes.has_key?(:'amount')
|
|
138
|
+
self.amount = attributes[:'amount']
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
if attributes.has_key?(:'fees')
|
|
142
|
+
self.fees = attributes[:'fees']
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
if attributes.has_key?(:'webid')
|
|
146
|
+
self.webid = attributes[:'webid']
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
if attributes.has_key?(:'state')
|
|
150
|
+
self.state = attributes[:'state']
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
if attributes.has_key?(:'error')
|
|
154
|
+
self.error = attributes[:'error']
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
if attributes.has_key?(:'label')
|
|
158
|
+
self.label = attributes[:'label']
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
if attributes.has_key?(:'account_balance')
|
|
162
|
+
self.account_balance = attributes[:'account_balance']
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
if attributes.has_key?(:'id_transaction')
|
|
166
|
+
self.id_transaction = attributes[:'id_transaction']
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
if attributes.has_key?(:'currency')
|
|
170
|
+
self.currency = attributes[:'currency']
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
176
|
+
# @return Array for valid properties with the reasons
|
|
177
|
+
def list_invalid_properties
|
|
178
|
+
invalid_properties = Array.new
|
|
179
|
+
if @id.nil?
|
|
180
|
+
invalid_properties.push("invalid value for 'id', id cannot be nil.")
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
if @exec_date.nil?
|
|
184
|
+
invalid_properties.push("invalid value for 'exec_date', exec_date cannot be nil.")
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
if @register_date.nil?
|
|
188
|
+
invalid_properties.push("invalid value for 'register_date', register_date cannot be nil.")
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
if @amount.nil?
|
|
192
|
+
invalid_properties.push("invalid value for 'amount', amount cannot be nil.")
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
if @state.nil?
|
|
196
|
+
invalid_properties.push("invalid value for 'state', state cannot be nil.")
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
return invalid_properties
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Check to see if the all the properties in the model are valid
|
|
203
|
+
# @return true if the model is valid
|
|
204
|
+
def valid?
|
|
205
|
+
return false if @id.nil?
|
|
206
|
+
return false if @exec_date.nil?
|
|
207
|
+
return false if @register_date.nil?
|
|
208
|
+
return false if @amount.nil?
|
|
209
|
+
return false if @state.nil?
|
|
210
|
+
return true
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
# Checks equality by comparing each attribute.
|
|
214
|
+
# @param [Object] Object to be compared
|
|
215
|
+
def ==(o)
|
|
216
|
+
return true if self.equal?(o)
|
|
217
|
+
self.class == o.class &&
|
|
218
|
+
id == o.id &&
|
|
219
|
+
id_account == o.id_account &&
|
|
220
|
+
id_recipient == o.id_recipient &&
|
|
221
|
+
account_iban == o.account_iban &&
|
|
222
|
+
recipient_iban == o.recipient_iban &&
|
|
223
|
+
exec_date == o.exec_date &&
|
|
224
|
+
register_date == o.register_date &&
|
|
225
|
+
amount == o.amount &&
|
|
226
|
+
fees == o.fees &&
|
|
227
|
+
webid == o.webid &&
|
|
228
|
+
state == o.state &&
|
|
229
|
+
error == o.error &&
|
|
230
|
+
label == o.label &&
|
|
231
|
+
account_balance == o.account_balance &&
|
|
232
|
+
id_transaction == o.id_transaction &&
|
|
233
|
+
currency == o.currency
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
# @see the `==` method
|
|
237
|
+
# @param [Object] Object to be compared
|
|
238
|
+
def eql?(o)
|
|
239
|
+
self == o
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
# Calculates hash code according to all attributes.
|
|
243
|
+
# @return [Fixnum] Hash code
|
|
244
|
+
def hash
|
|
245
|
+
[id, id_account, id_recipient, account_iban, recipient_iban, exec_date, register_date, amount, fees, webid, state, error, label, account_balance, id_transaction, currency].hash
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
# Builds the object from hash
|
|
249
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
250
|
+
# @return [Object] Returns the model itself
|
|
251
|
+
def build_from_hash(attributes)
|
|
252
|
+
return nil unless attributes.is_a?(Hash)
|
|
253
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
254
|
+
if type =~ /\AArray<(.*)>/i
|
|
255
|
+
# check to ensure the input is an array given that the the attribute
|
|
256
|
+
# is documented as an array but the input is not
|
|
257
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
258
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
|
259
|
+
end
|
|
260
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
261
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
262
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
self
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
# Deserializes the data based on type
|
|
269
|
+
# @param string type Data type
|
|
270
|
+
# @param string value Value to be deserialized
|
|
271
|
+
# @return [Object] Deserialized data
|
|
272
|
+
def _deserialize(type, value)
|
|
273
|
+
case type.to_sym
|
|
274
|
+
when :DateTime
|
|
275
|
+
DateTime.parse(value)
|
|
276
|
+
when :Date
|
|
277
|
+
Date.parse(value)
|
|
278
|
+
when :String
|
|
279
|
+
value.to_s
|
|
280
|
+
when :Integer
|
|
281
|
+
value.to_i
|
|
282
|
+
when :Float
|
|
283
|
+
value.to_f
|
|
284
|
+
when :BOOLEAN
|
|
285
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
286
|
+
true
|
|
287
|
+
else
|
|
288
|
+
false
|
|
289
|
+
end
|
|
290
|
+
when :Object
|
|
291
|
+
# generic object (usually a Hash), return directly
|
|
292
|
+
value
|
|
293
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
294
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
295
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
296
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
297
|
+
k_type = Regexp.last_match[:k_type]
|
|
298
|
+
v_type = Regexp.last_match[:v_type]
|
|
299
|
+
{}.tap do |hash|
|
|
300
|
+
value.each do |k, v|
|
|
301
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
302
|
+
end
|
|
303
|
+
end
|
|
304
|
+
else # model
|
|
305
|
+
temp_model = BudgeaClient.const_get(type).new
|
|
306
|
+
temp_model.build_from_hash(value)
|
|
307
|
+
end
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
# Returns the string representation of the object
|
|
311
|
+
# @return [String] String presentation of the object
|
|
312
|
+
def to_s
|
|
313
|
+
to_hash.to_s
|
|
314
|
+
end
|
|
315
|
+
|
|
316
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
317
|
+
# @return [Hash] Returns the object in the form of hash
|
|
318
|
+
def to_body
|
|
319
|
+
to_hash
|
|
320
|
+
end
|
|
321
|
+
|
|
322
|
+
# Returns the object in the form of hash
|
|
323
|
+
# @return [Hash] Returns the object in the form of hash
|
|
324
|
+
def to_hash
|
|
325
|
+
hash = {}
|
|
326
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
327
|
+
value = self.send(attr)
|
|
328
|
+
next if value.nil?
|
|
329
|
+
hash[param] = _to_hash(value)
|
|
330
|
+
end
|
|
331
|
+
hash
|
|
332
|
+
end
|
|
333
|
+
|
|
334
|
+
# Outputs non-array value in the form of hash
|
|
335
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
336
|
+
# @param [Object] value Any valid value
|
|
337
|
+
# @return [Hash] Returns the value in the form of hash
|
|
338
|
+
def _to_hash(value)
|
|
339
|
+
if value.is_a?(Array)
|
|
340
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
341
|
+
elsif value.is_a?(Hash)
|
|
342
|
+
{}.tap do |hash|
|
|
343
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
344
|
+
end
|
|
345
|
+
elsif value.respond_to? :to_hash
|
|
346
|
+
value.to_hash
|
|
347
|
+
else
|
|
348
|
+
value
|
|
349
|
+
end
|
|
350
|
+
end
|
|
351
|
+
|
|
352
|
+
end
|
|
353
|
+
|
|
354
|
+
end
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'date'
|
|
4
|
+
|
|
5
|
+
module BudgeaClient
|
|
6
|
+
|
|
7
|
+
class User
|
|
8
|
+
attr_accessor :id
|
|
9
|
+
|
|
10
|
+
attr_accessor :signin
|
|
11
|
+
|
|
12
|
+
attr_accessor :platform
|
|
13
|
+
|
|
14
|
+
class EnumAttributeValidator
|
|
15
|
+
attr_reader :datatype
|
|
16
|
+
attr_reader :allowable_values
|
|
17
|
+
|
|
18
|
+
def initialize(datatype, allowable_values)
|
|
19
|
+
@allowable_values = allowable_values.map do |value|
|
|
20
|
+
case datatype.to_s
|
|
21
|
+
when /Integer/i
|
|
22
|
+
value.to_i
|
|
23
|
+
when /Float/i
|
|
24
|
+
value.to_f
|
|
25
|
+
else
|
|
26
|
+
value
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def valid?(value)
|
|
32
|
+
!value || allowable_values.include?(value)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
37
|
+
def self.attribute_map
|
|
38
|
+
{
|
|
39
|
+
:'id' => :'id',
|
|
40
|
+
:'signin' => :'signin',
|
|
41
|
+
:'platform' => :'platform'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Attribute type mapping.
|
|
46
|
+
def self.swagger_types
|
|
47
|
+
{
|
|
48
|
+
:'id' => :'Integer',
|
|
49
|
+
:'signin' => :'DateTime',
|
|
50
|
+
:'platform' => :'String'
|
|
51
|
+
}
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Initializes the object
|
|
55
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
56
|
+
def initialize(attributes = {})
|
|
57
|
+
return unless attributes.is_a?(Hash)
|
|
58
|
+
|
|
59
|
+
# convert string to symbol for hash key
|
|
60
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
61
|
+
|
|
62
|
+
if attributes.has_key?(:'id')
|
|
63
|
+
self.id = attributes[:'id']
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
if attributes.has_key?(:'signin')
|
|
67
|
+
self.signin = attributes[:'signin']
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
if attributes.has_key?(:'platform')
|
|
71
|
+
self.platform = attributes[:'platform']
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
77
|
+
# @return Array for valid properties with the reasons
|
|
78
|
+
def list_invalid_properties
|
|
79
|
+
invalid_properties = Array.new
|
|
80
|
+
if @id.nil?
|
|
81
|
+
invalid_properties.push("invalid value for 'id', id cannot be nil.")
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
if @signin.nil?
|
|
85
|
+
invalid_properties.push("invalid value for 'signin', signin cannot be nil.")
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
if @platform.nil?
|
|
89
|
+
invalid_properties.push("invalid value for 'platform', platform cannot be nil.")
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
return invalid_properties
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Check to see if the all the properties in the model are valid
|
|
96
|
+
# @return true if the model is valid
|
|
97
|
+
def valid?
|
|
98
|
+
return false if @id.nil?
|
|
99
|
+
return false if @signin.nil?
|
|
100
|
+
return false if @platform.nil?
|
|
101
|
+
platform_validator = EnumAttributeValidator.new('String', ["web", "iPad", "iPhone", "Android", "CAstore", "requestAccess", "sharedAccess", "transfer"])
|
|
102
|
+
return false unless platform_validator.valid?(@platform)
|
|
103
|
+
return true
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
107
|
+
# @param [Object] platform Object to be assigned
|
|
108
|
+
def platform=(platform)
|
|
109
|
+
validator = EnumAttributeValidator.new('String', ["web", "iPad", "iPhone", "Android", "CAstore", "requestAccess", "sharedAccess", "transfer"])
|
|
110
|
+
unless validator.valid?(platform)
|
|
111
|
+
fail ArgumentError, "invalid value for 'platform', must be one of #{validator.allowable_values}."
|
|
112
|
+
end
|
|
113
|
+
@platform = platform
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Checks equality by comparing each attribute.
|
|
117
|
+
# @param [Object] Object to be compared
|
|
118
|
+
def ==(o)
|
|
119
|
+
return true if self.equal?(o)
|
|
120
|
+
self.class == o.class &&
|
|
121
|
+
id == o.id &&
|
|
122
|
+
signin == o.signin &&
|
|
123
|
+
platform == o.platform
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# @see the `==` method
|
|
127
|
+
# @param [Object] Object to be compared
|
|
128
|
+
def eql?(o)
|
|
129
|
+
self == o
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Calculates hash code according to all attributes.
|
|
133
|
+
# @return [Fixnum] Hash code
|
|
134
|
+
def hash
|
|
135
|
+
[id, signin, platform].hash
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Builds the object from hash
|
|
139
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
140
|
+
# @return [Object] Returns the model itself
|
|
141
|
+
def build_from_hash(attributes)
|
|
142
|
+
return nil unless attributes.is_a?(Hash)
|
|
143
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
144
|
+
if type =~ /\AArray<(.*)>/i
|
|
145
|
+
# check to ensure the input is an array given that the the attribute
|
|
146
|
+
# is documented as an array but the input is not
|
|
147
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
148
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
|
149
|
+
end
|
|
150
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
151
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
152
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
self
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Deserializes the data based on type
|
|
159
|
+
# @param string type Data type
|
|
160
|
+
# @param string value Value to be deserialized
|
|
161
|
+
# @return [Object] Deserialized data
|
|
162
|
+
def _deserialize(type, value)
|
|
163
|
+
case type.to_sym
|
|
164
|
+
when :DateTime
|
|
165
|
+
DateTime.parse(value)
|
|
166
|
+
when :Date
|
|
167
|
+
Date.parse(value)
|
|
168
|
+
when :String
|
|
169
|
+
value.to_s
|
|
170
|
+
when :Integer
|
|
171
|
+
value.to_i
|
|
172
|
+
when :Float
|
|
173
|
+
value.to_f
|
|
174
|
+
when :BOOLEAN
|
|
175
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
176
|
+
true
|
|
177
|
+
else
|
|
178
|
+
false
|
|
179
|
+
end
|
|
180
|
+
when :Object
|
|
181
|
+
# generic object (usually a Hash), return directly
|
|
182
|
+
value
|
|
183
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
184
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
185
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
186
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
187
|
+
k_type = Regexp.last_match[:k_type]
|
|
188
|
+
v_type = Regexp.last_match[:v_type]
|
|
189
|
+
{}.tap do |hash|
|
|
190
|
+
value.each do |k, v|
|
|
191
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
192
|
+
end
|
|
193
|
+
end
|
|
194
|
+
else # model
|
|
195
|
+
temp_model = BudgeaClient.const_get(type).new
|
|
196
|
+
temp_model.build_from_hash(value)
|
|
197
|
+
end
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
# Returns the string representation of the object
|
|
201
|
+
# @return [String] String presentation of the object
|
|
202
|
+
def to_s
|
|
203
|
+
to_hash.to_s
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
207
|
+
# @return [Hash] Returns the object in the form of hash
|
|
208
|
+
def to_body
|
|
209
|
+
to_hash
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# Returns the object in the form of hash
|
|
213
|
+
# @return [Hash] Returns the object in the form of hash
|
|
214
|
+
def to_hash
|
|
215
|
+
hash = {}
|
|
216
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
217
|
+
value = self.send(attr)
|
|
218
|
+
next if value.nil?
|
|
219
|
+
hash[param] = _to_hash(value)
|
|
220
|
+
end
|
|
221
|
+
hash
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
# Outputs non-array value in the form of hash
|
|
225
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
226
|
+
# @param [Object] value Any valid value
|
|
227
|
+
# @return [Hash] Returns the value in the form of hash
|
|
228
|
+
def _to_hash(value)
|
|
229
|
+
if value.is_a?(Array)
|
|
230
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
231
|
+
elsif value.is_a?(Hash)
|
|
232
|
+
{}.tap do |hash|
|
|
233
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
234
|
+
end
|
|
235
|
+
elsif value.respond_to? :to_hash
|
|
236
|
+
value.to_hash
|
|
237
|
+
else
|
|
238
|
+
value
|
|
239
|
+
end
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
end
|