Class: ShellCardManagementApIs::PurchaseCategoryRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellCardManagementApIs::PurchaseCategoryRequest
- Defined in:
- lib/shell_card_management_ap_is/models/purchase_category_request.rb
Overview
PurchaseCategoryRequest Model.
Instance Attribute Summary collapse
-
#card_type_id ⇒ Integer
Card type Id.
-
#col_co_code ⇒ Integer
Collecting Company Code (Shell Code).
-
#col_co_id ⇒ Integer
Collecting Company Id (in Shell Cards Platform).
-
#language_code ⇒ String
Language code for the Title and Description.
-
#purchase_category_id ⇒ Integer
Purchase category Id Optional.
-
#request_id ⇒ String
Mandatory UUID (according to RFC 4122 standards) for requests and responses.
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(request_id = SKIP, col_co_code = SKIP, col_co_id = SKIP, card_type_id = SKIP, purchase_category_id = SKIP, language_code = SKIP) ⇒ PurchaseCategoryRequest
constructor
A new instance of PurchaseCategoryRequest.
Methods inherited from BaseModel
Constructor Details
#initialize(request_id = SKIP, col_co_code = SKIP, col_co_id = SKIP, card_type_id = SKIP, purchase_category_id = SKIP, language_code = SKIP) ⇒ PurchaseCategoryRequest
Returns a new instance of PurchaseCategoryRequest.
78 79 80 81 82 83 84 85 86 87 |
# File 'lib/shell_card_management_ap_is/models/purchase_category_request.rb', line 78 def initialize(request_id = SKIP, col_co_code = SKIP, col_co_id = SKIP, card_type_id = SKIP, purchase_category_id = SKIP, language_code = SKIP) @request_id = request_id unless request_id == SKIP @col_co_code = col_co_code unless col_co_code == SKIP @col_co_id = col_co_id unless col_co_id == SKIP @card_type_id = card_type_id unless card_type_id == SKIP @purchase_category_id = purchase_category_id unless purchase_category_id == SKIP @language_code = language_code unless language_code == SKIP end |
Instance Attribute Details
#card_type_id ⇒ Integer
Card type Id
27 28 29 |
# File 'lib/shell_card_management_ap_is/models/purchase_category_request.rb', line 27 def card_type_id @card_type_id end |
#col_co_code ⇒ Integer
Collecting Company Code (Shell Code).
19 20 21 |
# File 'lib/shell_card_management_ap_is/models/purchase_category_request.rb', line 19 def col_co_code @col_co_code end |
#col_co_id ⇒ Integer
Collecting Company Id (in Shell Cards Platform).
23 24 25 |
# File 'lib/shell_card_management_ap_is/models/purchase_category_request.rb', line 23 def col_co_id @col_co_id end |
#language_code ⇒ String
Language code for the Title and Description. Language codes should be same as SFH supported language Optional. Default: en-GB Example: en-GB – English (UK) nl-NL – Dutch (Netherlands)
43 44 45 |
# File 'lib/shell_card_management_ap_is/models/purchase_category_request.rb', line 43 def language_code @language_code end |
#purchase_category_id ⇒ Integer
Purchase category Id Optional. Example: 123, 124, etc.,
33 34 35 |
# File 'lib/shell_card_management_ap_is/models/purchase_category_request.rb', line 33 def purchase_category_id @purchase_category_id end |
#request_id ⇒ String
Mandatory UUID (according to RFC 4122 standards) for requests and responses. This will be played back in the response from the request.
15 16 17 |
# File 'lib/shell_card_management_ap_is/models/purchase_category_request.rb', line 15 def request_id @request_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/shell_card_management_ap_is/models/purchase_category_request.rb', line 90 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. request_id = hash.key?('RequestId') ? hash['RequestId'] : SKIP col_co_code = hash.key?('ColCoCode') ? hash['ColCoCode'] : SKIP col_co_id = hash.key?('ColCoId') ? hash['ColCoId'] : SKIP card_type_id = hash.key?('CardTypeId') ? hash['CardTypeId'] : SKIP purchase_category_id = hash.key?('PurchaseCategoryId') ? hash['PurchaseCategoryId'] : SKIP language_code = hash.key?('LanguageCode') ? hash['LanguageCode'] : SKIP # Create object from extracted values. PurchaseCategoryRequest.new(request_id, col_co_code, col_co_id, card_type_id, purchase_category_id, language_code) end |
.names ⇒ Object
A mapping from model property names to API property names.
46 47 48 49 50 51 52 53 54 55 |
# File 'lib/shell_card_management_ap_is/models/purchase_category_request.rb', line 46 def self.names @_hash = {} if @_hash.nil? @_hash['request_id'] = 'RequestId' @_hash['col_co_code'] = 'ColCoCode' @_hash['col_co_id'] = 'ColCoId' @_hash['card_type_id'] = 'CardTypeId' @_hash['purchase_category_id'] = 'PurchaseCategoryId' @_hash['language_code'] = 'LanguageCode' @_hash end |
.nullables ⇒ Object
An array for nullable fields
70 71 72 73 74 75 76 |
# File 'lib/shell_card_management_ap_is/models/purchase_category_request.rb', line 70 def self.nullables %w[ col_co_code col_co_id card_type_id ] end |
.optionals ⇒ Object
An array for optional fields
58 59 60 61 62 63 64 65 66 67 |
# File 'lib/shell_card_management_ap_is/models/purchase_category_request.rb', line 58 def self.optionals %w[ request_id col_co_code col_co_id card_type_id purchase_category_id language_code ] end |