Class: NewStoreApi::CashboxConfigFiskaltrustFrV1Dto
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- NewStoreApi::CashboxConfigFiskaltrustFrV1Dto
- Defined in:
- lib/new_store_api/models/cashbox_config_fiskaltrust_fr_v1_dto.rb
Overview
CashboxConfigFiskaltrustFrV1Dto Model.
Instance Attribute Summary collapse
-
#access_token ⇒ String
Access token of the cashbox provided by fiskaltrust France.
-
#ape_identifier ⇒ String
APE/NAF code of the retailer.
-
#cashbox_id ⇒ String
Cashbox identifier provided by fiskaltrust France.
-
#siret ⇒ String
SIRET number.
-
#vat_number ⇒ String
VAT identification number of the legal entity.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(access_token = nil, ape_identifier = nil, cashbox_id = nil, siret = nil, vat_number = nil) ⇒ CashboxConfigFiskaltrustFrV1Dto
constructor
A new instance of CashboxConfigFiskaltrustFrV1Dto.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(access_token = nil, ape_identifier = nil, cashbox_id = nil, siret = nil, vat_number = nil) ⇒ CashboxConfigFiskaltrustFrV1Dto
Returns a new instance of CashboxConfigFiskaltrustFrV1Dto.
58 59 60 61 62 63 64 65 |
# File 'lib/new_store_api/models/cashbox_config_fiskaltrust_fr_v1_dto.rb', line 58 def initialize(access_token = nil, ape_identifier = nil, cashbox_id = nil, siret = nil, vat_number = nil) @access_token = access_token @ape_identifier = ape_identifier @cashbox_id = cashbox_id @siret = siret @vat_number = vat_number end |
Instance Attribute Details
#access_token ⇒ String
Access token of the cashbox provided by fiskaltrust France.
14 15 16 |
# File 'lib/new_store_api/models/cashbox_config_fiskaltrust_fr_v1_dto.rb', line 14 def access_token @access_token end |
#ape_identifier ⇒ String
APE/NAF code of the retailer.
- APE/NAF code identifies the main branch of activity of the legal entity.
19 20 21 |
# File 'lib/new_store_api/models/cashbox_config_fiskaltrust_fr_v1_dto.rb', line 19 def ape_identifier @ape_identifier end |
#cashbox_id ⇒ String
Cashbox identifier provided by fiskaltrust France.
23 24 25 |
# File 'lib/new_store_api/models/cashbox_config_fiskaltrust_fr_v1_dto.rb', line 23 def cashbox_id @cashbox_id end |
#siret ⇒ String
SIRET number.
- SIREN number and an additional five-digit number that represents the specific location or establishment of the legal entity.
29 30 31 |
# File 'lib/new_store_api/models/cashbox_config_fiskaltrust_fr_v1_dto.rb', line 29 def siret @siret end |
#vat_number ⇒ String
VAT identification number of the legal entity.
- The VAT number in France consists of the country code (FR) followed by 11 digits, e.g. FR12345678901.
35 36 37 |
# File 'lib/new_store_api/models/cashbox_config_fiskaltrust_fr_v1_dto.rb', line 35 def vat_number @vat_number end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/new_store_api/models/cashbox_config_fiskaltrust_fr_v1_dto.rb', line 68 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. access_token = hash.key?('access_token') ? hash['access_token'] : nil ape_identifier = hash.key?('ape_identifier') ? hash['ape_identifier'] : nil cashbox_id = hash.key?('cashbox_id') ? hash['cashbox_id'] : nil siret = hash.key?('siret') ? hash['siret'] : nil vat_number = hash.key?('vat_number') ? hash['vat_number'] : nil # Create object from extracted values. CashboxConfigFiskaltrustFrV1Dto.new(access_token, ape_identifier, cashbox_id, siret, vat_number) end |
.names ⇒ Object
A mapping from model property names to API property names.
38 39 40 41 42 43 44 45 46 |
# File 'lib/new_store_api/models/cashbox_config_fiskaltrust_fr_v1_dto.rb', line 38 def self.names @_hash = {} if @_hash.nil? @_hash['access_token'] = 'access_token' @_hash['ape_identifier'] = 'ape_identifier' @_hash['cashbox_id'] = 'cashbox_id' @_hash['siret'] = 'siret' @_hash['vat_number'] = 'vat_number' @_hash end |
.nullables ⇒ Object
An array for nullable fields
54 55 56 |
# File 'lib/new_store_api/models/cashbox_config_fiskaltrust_fr_v1_dto.rb', line 54 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
49 50 51 |
# File 'lib/new_store_api/models/cashbox_config_fiskaltrust_fr_v1_dto.rb', line 49 def self.optionals [] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
# File 'lib/new_store_api/models/cashbox_config_fiskaltrust_fr_v1_dto.rb', line 89 def self.validate(value) if value.instance_of? self return ( APIHelper.valid_type?(value.access_token, ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value.ape_identifier, ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value.cashbox_id, ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value.siret, ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value.vat_number, ->(val) { val.instance_of? String }) ) end return false unless value.instance_of? Hash ( APIHelper.valid_type?(value['access_token'], ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value['ape_identifier'], ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value['cashbox_id'], ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value['siret'], ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value['vat_number'], ->(val) { val.instance_of? String }) ) end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
129 130 131 132 133 134 |
# File 'lib/new_store_api/models/cashbox_config_fiskaltrust_fr_v1_dto.rb', line 129 def inspect class_name = self.class.name.split('::').last "<#{class_name} access_token: #{@access_token.inspect}, ape_identifier:"\ " #{@ape_identifier.inspect}, cashbox_id: #{@cashbox_id.inspect}, siret: #{@siret.inspect},"\ " vat_number: #{@vat_number.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
122 123 124 125 126 |
# File 'lib/new_store_api/models/cashbox_config_fiskaltrust_fr_v1_dto.rb', line 122 def to_s class_name = self.class.name.split('::').last "<#{class_name} access_token: #{@access_token}, ape_identifier: #{@ape_identifier},"\ " cashbox_id: #{@cashbox_id}, siret: #{@siret}, vat_number: #{@vat_number}>" end |