Class: FactPulse::SoumettreFactureRequest
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- FactPulse::SoumettreFactureRequest
- Defined in:
- lib/factpulse/models/soumettre_facture_request.rb
Overview
Soumission d’une facture Chorus Pro.
Instance Attribute Summary collapse
-
#code_service ⇒ Object
Returns the value of attribute code_service.
-
#commentaire ⇒ Object
Returns the value of attribute commentaire.
-
#credentials ⇒ Object
Returns the value of attribute credentials.
-
#date_echeance_paiement ⇒ Object
Returns the value of attribute date_echeance_paiement.
-
#date_facture ⇒ Object
Date de facture (format ISO: YYYY-MM-DD).
-
#id_structure_cpp ⇒ Object
ID Chorus Pro de la structure destinataire.
-
#montant_ht_total ⇒ Object
Returns the value of attribute montant_ht_total.
-
#montant_ttc_total ⇒ Object
Returns the value of attribute montant_ttc_total.
-
#montant_tva ⇒ Object
Returns the value of attribute montant_tva.
-
#numero_bon_commande ⇒ Object
Returns the value of attribute numero_bon_commande.
-
#numero_engagement ⇒ Object
Returns the value of attribute numero_engagement.
-
#numero_facture ⇒ Object
Numéro de la facture.
-
#numero_marche ⇒ Object
Returns the value of attribute numero_marche.
-
#piece_jointe_principale_designation ⇒ Object
Returns the value of attribute piece_jointe_principale_designation.
-
#piece_jointe_principale_id ⇒ Object
Returns the value of attribute piece_jointe_principale_id.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ SoumettreFactureRequest
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ SoumettreFactureRequest
Initializes the object
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 |
# File 'lib/factpulse/models/soumettre_facture_request.rb', line 121 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `FactPulse::SoumettreFactureRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `FactPulse::SoumettreFactureRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'credentials') self.credentials = attributes[:'credentials'] end if attributes.key?(:'numero_facture') self.numero_facture = attributes[:'numero_facture'] else self.numero_facture = nil end if attributes.key?(:'date_facture') self.date_facture = attributes[:'date_facture'] else self.date_facture = nil end if attributes.key?(:'date_echeance_paiement') self.date_echeance_paiement = attributes[:'date_echeance_paiement'] end if attributes.key?(:'id_structure_cpp') self.id_structure_cpp = attributes[:'id_structure_cpp'] else self.id_structure_cpp = nil end if attributes.key?(:'code_service') self.code_service = attributes[:'code_service'] end if attributes.key?(:'numero_engagement') self.numero_engagement = attributes[:'numero_engagement'] end if attributes.key?(:'montant_ht_total') self.montant_ht_total = attributes[:'montant_ht_total'] else self.montant_ht_total = nil end if attributes.key?(:'montant_tva') self.montant_tva = attributes[:'montant_tva'] else self.montant_tva = nil end if attributes.key?(:'montant_ttc_total') self.montant_ttc_total = attributes[:'montant_ttc_total'] else self.montant_ttc_total = nil end if attributes.key?(:'piece_jointe_principale_id') self.piece_jointe_principale_id = attributes[:'piece_jointe_principale_id'] end if attributes.key?(:'piece_jointe_principale_designation') self.piece_jointe_principale_designation = attributes[:'piece_jointe_principale_designation'] end if attributes.key?(:'commentaire') self.commentaire = attributes[:'commentaire'] end if attributes.key?(:'numero_bon_commande') self.numero_bon_commande = attributes[:'numero_bon_commande'] end if attributes.key?(:'numero_marche') self.numero_marche = attributes[:'numero_marche'] end end |
Instance Attribute Details
#code_service ⇒ Object
Returns the value of attribute code_service.
32 33 34 |
# File 'lib/factpulse/models/soumettre_facture_request.rb', line 32 def code_service @code_service end |
#commentaire ⇒ Object
Returns the value of attribute commentaire.
46 47 48 |
# File 'lib/factpulse/models/soumettre_facture_request.rb', line 46 def commentaire @commentaire end |
#credentials ⇒ Object
Returns the value of attribute credentials.
19 20 21 |
# File 'lib/factpulse/models/soumettre_facture_request.rb', line 19 def credentials @credentials end |
#date_echeance_paiement ⇒ Object
Returns the value of attribute date_echeance_paiement.
27 28 29 |
# File 'lib/factpulse/models/soumettre_facture_request.rb', line 27 def date_echeance_paiement @date_echeance_paiement end |
#date_facture ⇒ Object
Date de facture (format ISO: YYYY-MM-DD)
25 26 27 |
# File 'lib/factpulse/models/soumettre_facture_request.rb', line 25 def date_facture @date_facture end |
#id_structure_cpp ⇒ Object
ID Chorus Pro de la structure destinataire
30 31 32 |
# File 'lib/factpulse/models/soumettre_facture_request.rb', line 30 def id_structure_cpp @id_structure_cpp end |
#montant_ht_total ⇒ Object
Returns the value of attribute montant_ht_total.
36 37 38 |
# File 'lib/factpulse/models/soumettre_facture_request.rb', line 36 def montant_ht_total @montant_ht_total end |
#montant_ttc_total ⇒ Object
Returns the value of attribute montant_ttc_total.
40 41 42 |
# File 'lib/factpulse/models/soumettre_facture_request.rb', line 40 def montant_ttc_total @montant_ttc_total end |
#montant_tva ⇒ Object
Returns the value of attribute montant_tva.
38 39 40 |
# File 'lib/factpulse/models/soumettre_facture_request.rb', line 38 def montant_tva @montant_tva end |
#numero_bon_commande ⇒ Object
Returns the value of attribute numero_bon_commande.
48 49 50 |
# File 'lib/factpulse/models/soumettre_facture_request.rb', line 48 def numero_bon_commande @numero_bon_commande end |
#numero_engagement ⇒ Object
Returns the value of attribute numero_engagement.
34 35 36 |
# File 'lib/factpulse/models/soumettre_facture_request.rb', line 34 def numero_engagement @numero_engagement end |
#numero_facture ⇒ Object
Numéro de la facture
22 23 24 |
# File 'lib/factpulse/models/soumettre_facture_request.rb', line 22 def numero_facture @numero_facture end |
#numero_marche ⇒ Object
Returns the value of attribute numero_marche.
50 51 52 |
# File 'lib/factpulse/models/soumettre_facture_request.rb', line 50 def numero_marche @numero_marche end |
#piece_jointe_principale_designation ⇒ Object
Returns the value of attribute piece_jointe_principale_designation.
44 45 46 |
# File 'lib/factpulse/models/soumettre_facture_request.rb', line 44 def piece_jointe_principale_designation @piece_jointe_principale_designation end |
#piece_jointe_principale_id ⇒ Object
Returns the value of attribute piece_jointe_principale_id.
42 43 44 |
# File 'lib/factpulse/models/soumettre_facture_request.rb', line 42 def piece_jointe_principale_id @piece_jointe_principale_id end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
74 75 76 |
# File 'lib/factpulse/models/soumettre_facture_request.rb', line 74 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
79 80 81 |
# File 'lib/factpulse/models/soumettre_facture_request.rb', line 79 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/factpulse/models/soumettre_facture_request.rb', line 53 def self.attribute_map { :'credentials' => :'credentials', :'numero_facture' => :'numero_facture', :'date_facture' => :'date_facture', :'date_echeance_paiement' => :'date_echeance_paiement', :'id_structure_cpp' => :'id_structure_cpp', :'code_service' => :'code_service', :'numero_engagement' => :'numero_engagement', :'montant_ht_total' => :'montant_ht_total', :'montant_tva' => :'montant_tva', :'montant_ttc_total' => :'montant_ttc_total', :'piece_jointe_principale_id' => :'piece_jointe_principale_id', :'piece_jointe_principale_designation' => :'piece_jointe_principale_designation', :'commentaire' => :'commentaire', :'numero_bon_commande' => :'numero_bon_commande', :'numero_marche' => :'numero_marche' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 |
# File 'lib/factpulse/models/soumettre_facture_request.rb', line 350 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/factpulse/models/soumettre_facture_request.rb', line 105 def self.openapi_nullable Set.new([ :'credentials', :'date_echeance_paiement', :'code_service', :'numero_engagement', :'piece_jointe_principale_id', :'piece_jointe_principale_designation', :'commentaire', :'numero_bon_commande', :'numero_marche' ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/factpulse/models/soumettre_facture_request.rb', line 84 def self.openapi_types { :'credentials' => :'ChorusProCredentials', :'numero_facture' => :'String', :'date_facture' => :'String', :'date_echeance_paiement' => :'String', :'id_structure_cpp' => :'Integer', :'code_service' => :'String', :'numero_engagement' => :'String', :'montant_ht_total' => :'MontantHtTotal', :'montant_tva' => :'MontantTva', :'montant_ttc_total' => :'MontantTtcTotal', :'piece_jointe_principale_id' => :'Integer', :'piece_jointe_principale_designation' => :'String', :'commentaire' => :'String', :'numero_bon_commande' => :'String', :'numero_marche' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 |
# File 'lib/factpulse/models/soumettre_facture_request.rb', line 315 def ==(o) return true if self.equal?(o) self.class == o.class && credentials == o.credentials && numero_facture == o.numero_facture && date_facture == o.date_facture && date_echeance_paiement == o.date_echeance_paiement && id_structure_cpp == o.id_structure_cpp && code_service == o.code_service && numero_engagement == o.numero_engagement && montant_ht_total == o.montant_ht_total && montant_tva == o.montant_tva && montant_ttc_total == o.montant_ttc_total && piece_jointe_principale_id == o.piece_jointe_principale_id && piece_jointe_principale_designation == o.piece_jointe_principale_designation && commentaire == o.commentaire && numero_bon_commande == o.numero_bon_commande && numero_marche == o.numero_marche end |
#eql?(o) ⇒ Boolean
337 338 339 |
# File 'lib/factpulse/models/soumettre_facture_request.rb', line 337 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
343 344 345 |
# File 'lib/factpulse/models/soumettre_facture_request.rb', line 343 def hash [credentials, numero_facture, date_facture, date_echeance_paiement, id_structure_cpp, code_service, numero_engagement, montant_ht_total, montant_tva, montant_ttc_total, piece_jointe_principale_id, piece_jointe_principale_designation, commentaire, numero_bon_commande, numero_marche].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 |
# File 'lib/factpulse/models/soumettre_facture_request.rb', line 210 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @numero_facture.nil? invalid_properties.push('invalid value for "numero_facture", numero_facture cannot be nil.') end if @date_facture.nil? invalid_properties.push('invalid value for "date_facture", date_facture cannot be nil.') end if @id_structure_cpp.nil? invalid_properties.push('invalid value for "id_structure_cpp", id_structure_cpp cannot be nil.') end if @montant_ht_total.nil? invalid_properties.push('invalid value for "montant_ht_total", montant_ht_total cannot be nil.') end if @montant_tva.nil? invalid_properties.push('invalid value for "montant_tva", montant_tva cannot be nil.') end if @montant_ttc_total.nil? invalid_properties.push('invalid value for "montant_ttc_total", montant_ttc_total cannot be nil.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
372 373 374 375 376 377 378 379 380 381 382 383 384 |
# File 'lib/factpulse/models/soumettre_facture_request.rb', line 372 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
242 243 244 245 246 247 248 249 250 251 |
# File 'lib/factpulse/models/soumettre_facture_request.rb', line 242 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @numero_facture.nil? return false if @date_facture.nil? return false if @id_structure_cpp.nil? return false if @montant_ht_total.nil? return false if @montant_tva.nil? return false if @montant_ttc_total.nil? true end |