Class: FdxV660Api::HateoasLink7
- Defined in:
- lib/fdx_v660_api/models/hateoas_link7.rb
Overview
Resource URL for retrieving full request for payment details
Instance Attribute Summary collapse
-
#action ⇒ HttpActionType2
HTTP Method to use for the request.
-
#href ⇒ String
URL to invoke the action on the resource.
-
#rel ⇒ String
Relation of this link to its containing entity, as defined by IETF RFC5988 with many relation values specified in its Section 6.2.2, for example: *
self- Link to the current resource latest state or with more detail *prev- Previous page in a paginated result set *next- Subsequent page in a paginated result set *first- First page in a paginated result set *last- Last page in a paginated result set *related- Link to a related resource, like a Transaction's referenceTransactionId *up- Link to a related 'parent' resource, like a child account's parent account *payment- Link to a payment-scheduling endpoint Specific to FDX,relvalues can contain a data cluster or space-delimited list of data clusters which link to the referenced data type(s), for example: *ACCOUNT_DETAILED- Link to the account's details via/accounts/{accountId}*PAYMENT_SUPPORT- Link to the account's ID and bank ID for payments or transfers via/accounts/{accountId}/payment-networks*CUSTOMER_CONTACT- Link to the account's customer contact details via/accounts/{accountId}/contact*TRANSACTIONS- Link to the account's transactions list via/accounts/{accountId}/transactions*REWARDS- Link to the account's reward program via/reward-programs/{rewardProgramId}*TRANSACTIONS REWARDS- Specific link to the account's transaction rewards via/accounts/{accountId}/reward-transactions*STATEMENTS- Link to the account's statements list via/accounts/{accountId}/statements*IMAGES- Link to the transaction's images list via/accounts/{accountId}/transaction-images/{imageId}. -
#types ⇒ Array[ContentTypes]
Content-types that can be used in the Accept header.
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(href:, action: SKIP, rel: SKIP, types: SKIP, additional_properties: nil) ⇒ HateoasLink7
constructor
A new instance of HateoasLink7.
-
#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(href:, action: SKIP, rel: SKIP, types: SKIP, additional_properties: nil) ⇒ HateoasLink7
Returns a new instance of HateoasLink7.
84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/fdx_v660_api/models/hateoas_link7.rb', line 84 def initialize(href:, action: SKIP, rel: SKIP, types: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @href = href @action = action unless action == SKIP @rel = rel unless rel == SKIP @types = types unless types == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#action ⇒ HttpActionType2
HTTP Method to use for the request
18 19 20 |
# File 'lib/fdx_v660_api/models/hateoas_link7.rb', line 18 def action @action end |
#href ⇒ String
URL to invoke the action on the resource
14 15 16 |
# File 'lib/fdx_v660_api/models/hateoas_link7.rb', line 14 def href @href end |
#rel ⇒ String
Relation of this link to its containing entity, as defined by IETF RFC5988 with many relation values specified in its Section 6.2.2, for example:
* `self` - Link to the current resource latest state or with more detail
* `prev` - Previous page in a paginated result set
* `next` - Subsequent page in a paginated result set
* `first` - First page in a paginated result set
* `last` - Last page in a paginated result set
* `related` - Link to a related resource, like a Transaction's
referenceTransactionId
up- Link to a related 'parent' resource, like a child account's parent accountpayment- Link to a payment-scheduling endpoint Specific to FDX,relvalues can contain a data cluster or space-delimited list of data clusters which link to the referenced data type(s), for example:ACCOUNT_DETAILED- Link to the account's details via/accounts/{accountId}PAYMENT_SUPPORT- Link to the account's ID and bank ID for payments or transfers via/accounts/{accountId}/payment-networksCUSTOMER_CONTACT- Link to the account's customer contact details via/accounts/{accountId}/contactTRANSACTIONS- Link to the account's transactions list via/accounts/{accountId}/transactionsREWARDS- Link to the account's reward program via/reward-programs/{rewardProgramId}TRANSACTIONS REWARDS- Specific link to the account's transaction rewards via/accounts/{accountId}/reward-transactionsSTATEMENTS- Link to the account's statements list via/accounts/{accountId}/statementsIMAGES- Link to the transaction's images list via/accounts/{accountId}/transaction-images/{imageId}
54 55 56 |
# File 'lib/fdx_v660_api/models/hateoas_link7.rb', line 54 def rel @rel end |
#types ⇒ Array[ContentTypes]
Content-types that can be used in the Accept header
58 59 60 |
# File 'lib/fdx_v660_api/models/hateoas_link7.rb', line 58 def types @types end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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/fdx_v660_api/models/hateoas_link7.rb', line 97 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. href = hash.key?('href') ? hash['href'] : nil action = hash.key?('action') ? hash['action'] : SKIP rel = hash.key?('rel') ? hash['rel'] : SKIP types = hash.key?('types') ? hash['types'] : SKIP # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. HateoasLink7.new(href: href, action: action, rel: rel, types: types, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
61 62 63 64 65 66 67 68 |
# File 'lib/fdx_v660_api/models/hateoas_link7.rb', line 61 def self.names @_hash = {} if @_hash.nil? @_hash['href'] = 'href' @_hash['action'] = 'action' @_hash['rel'] = 'rel' @_hash['types'] = 'types' @_hash end |
.nullables ⇒ Object
An array for nullable fields
80 81 82 |
# File 'lib/fdx_v660_api/models/hateoas_link7.rb', line 80 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
71 72 73 74 75 76 77 |
# File 'lib/fdx_v660_api/models/hateoas_link7.rb', line 71 def self.optionals %w[ action rel types ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
129 130 131 132 133 |
# File 'lib/fdx_v660_api/models/hateoas_link7.rb', line 129 def inspect class_name = self.class.name.split('::').last "<#{class_name} href: #{@href.inspect}, action: #{@action.inspect}, rel: #{@rel.inspect},"\ " types: #{@types.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
122 123 124 125 126 |
# File 'lib/fdx_v660_api/models/hateoas_link7.rb', line 122 def to_s class_name = self.class.name.split('::').last "<#{class_name} href: #{@href}, action: #{@action}, rel: #{@rel}, types: #{@types},"\ " additional_properties: #{@additional_properties}>" end |