Class: ShellCardManagementApIs::InvoiceDistributionMethod
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellCardManagementApIs::InvoiceDistributionMethod
- Defined in:
- lib/shell_card_management_ap_is/models/invoice_distribution_method.rb
Overview
InvoiceDistributionMethod Model.
Instance Attribute Summary collapse
-
#distribution_method ⇒ String
Invoice Distribution Method (Id-Description) E.g.: 1-e-mail 2-Fax 3-Courier to Customer 4-Courier to Client 5-Print 6-FTP 7-SMS.
-
#frequency_type ⇒ String
Frequency type unit Id & description E.g.: 1- Daily 2-Weekly 3-Monthly 4-Invoicing 6-Calendar quarter.
-
#is_primary ⇒ TrueClass | FalseClass
If True then this distribution method is the default distribution method.
-
#output_type ⇒ String
Invoice output type (Id - Description).
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.
Instance Method Summary collapse
-
#initialize(is_primary = true, frequency_type = SKIP, distribution_method = SKIP, output_type = SKIP) ⇒ InvoiceDistributionMethod
constructor
A new instance of InvoiceDistributionMethod.
Methods inherited from BaseModel
Constructor Details
#initialize(is_primary = true, frequency_type = SKIP, distribution_method = SKIP, output_type = SKIP) ⇒ InvoiceDistributionMethod
Returns a new instance of InvoiceDistributionMethod.
71 72 73 74 75 76 77 |
# File 'lib/shell_card_management_ap_is/models/invoice_distribution_method.rb', line 71 def initialize(is_primary = true, frequency_type = SKIP, distribution_method = SKIP, output_type = SKIP) @is_primary = is_primary unless is_primary == SKIP @frequency_type = frequency_type unless frequency_type == SKIP @distribution_method = distribution_method unless distribution_method == SKIP @output_type = output_type unless output_type == SKIP end |
Instance Attribute Details
#distribution_method ⇒ String
Invoice Distribution Method (Id-Description) E.g.: 1-e-mail 2-Fax 3-Courier to Customer 4-Courier to Client 5-Print 6-FTP 7-SMS
36 37 38 |
# File 'lib/shell_card_management_ap_is/models/invoice_distribution_method.rb', line 36 def distribution_method @distribution_method end |
#frequency_type ⇒ String
Frequency type unit Id & description E.g.: 1- Daily 2-Weekly 3-Monthly 4-Invoicing 6-Calendar quarter
24 25 26 |
# File 'lib/shell_card_management_ap_is/models/invoice_distribution_method.rb', line 24 def frequency_type @frequency_type end |
#is_primary ⇒ TrueClass | FalseClass
If True then this distribution method is the default distribution method.
14 15 16 |
# File 'lib/shell_card_management_ap_is/models/invoice_distribution_method.rb', line 14 def is_primary @is_primary end |
#output_type ⇒ String
Invoice output type (Id - Description)
40 41 42 |
# File 'lib/shell_card_management_ap_is/models/invoice_distribution_method.rb', line 40 def output_type @output_type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/shell_card_management_ap_is/models/invoice_distribution_method.rb', line 80 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. is_primary = hash['IsPrimary'] ||= true frequency_type = hash.key?('FrequencyType') ? hash['FrequencyType'] : SKIP distribution_method = hash.key?('DistributionMethod') ? hash['DistributionMethod'] : SKIP output_type = hash.key?('OutputType') ? hash['OutputType'] : SKIP # Create object from extracted values. InvoiceDistributionMethod.new(is_primary, frequency_type, distribution_method, output_type) end |
.names ⇒ Object
A mapping from model property names to API property names.
43 44 45 46 47 48 49 50 |
# File 'lib/shell_card_management_ap_is/models/invoice_distribution_method.rb', line 43 def self.names @_hash = {} if @_hash.nil? @_hash['is_primary'] = 'IsPrimary' @_hash['frequency_type'] = 'FrequencyType' @_hash['distribution_method'] = 'DistributionMethod' @_hash['output_type'] = 'OutputType' @_hash end |
.nullables ⇒ Object
An array for nullable fields
63 64 65 66 67 68 69 |
# File 'lib/shell_card_management_ap_is/models/invoice_distribution_method.rb', line 63 def self.nullables %w[ frequency_type distribution_method output_type ] end |
.optionals ⇒ Object
An array for optional fields
53 54 55 56 57 58 59 60 |
# File 'lib/shell_card_management_ap_is/models/invoice_distribution_method.rb', line 53 def self.optionals %w[ is_primary frequency_type distribution_method output_type ] end |