Class: WebPay::CreatedRange
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Class Method Summary collapse
Instance Method Summary collapse
-
#gt ⇒ Object
attributes accessors.
- #gt=(value) ⇒ Object
- #gte ⇒ Object
- #gte=(value) ⇒ Object
-
#initialize(hash = {}) ⇒ CreatedRange
constructor
A new instance of CreatedRange.
- #lt ⇒ Object
- #lt=(value) ⇒ Object
- #lte ⇒ Object
- #lte=(value) ⇒ Object
- #query_params ⇒ Object
- #request_body ⇒ Object
Methods inherited from Entity
Constructor Details
#initialize(hash = {}) ⇒ CreatedRange
Returns a new instance of CreatedRange.
555 556 557 558 |
# File 'lib/webpay/data_types.rb', line 555 def initialize(hash = {}) hash = normalize_hash(hash) @attributes = hash end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
538 539 540 |
# File 'lib/webpay/data_types.rb', line 538 def attributes @attributes end |
Class Method Details
.create(params) ⇒ Object
545 546 547 548 549 550 551 552 553 |
# File 'lib/webpay/data_types.rb', line 545 def self.create(params) return params if params.is_a?(self) hash = case params when Hash; params else raise WebPay::InvalidRequestError.new("#{self} does not accept the given value", params) end self.new(hash) end |
.fields ⇒ Object
540 541 542 |
# File 'lib/webpay/data_types.rb', line 540 def self.fields ['gt', 'gte', 'lt', 'lte'] end |
Instance Method Details
#gt ⇒ Object
attributes accessors
577 578 579 |
# File 'lib/webpay/data_types.rb', line 577 def gt attributes['gt'] end |
#gt=(value) ⇒ Object
581 582 583 |
# File 'lib/webpay/data_types.rb', line 581 def gt=(value) attributes['gt'] = value end |
#gte ⇒ Object
585 586 587 |
# File 'lib/webpay/data_types.rb', line 585 def gte attributes['gte'] end |
#gte=(value) ⇒ Object
589 590 591 |
# File 'lib/webpay/data_types.rb', line 589 def gte=(value) attributes['gte'] = value end |
#lt ⇒ Object
593 594 595 |
# File 'lib/webpay/data_types.rb', line 593 def lt attributes['lt'] end |
#lt=(value) ⇒ Object
597 598 599 |
# File 'lib/webpay/data_types.rb', line 597 def lt=(value) attributes['lt'] = value end |
#lte ⇒ Object
601 602 603 |
# File 'lib/webpay/data_types.rb', line 601 def lte attributes['lte'] end |
#lte=(value) ⇒ Object
605 606 607 |
# File 'lib/webpay/data_types.rb', line 605 def lte=(value) attributes['lte'] = value end |
#query_params ⇒ Object
566 567 568 569 570 571 572 573 |
# File 'lib/webpay/data_types.rb', line 566 def query_params result = {} copy_if_exists(@attributes, result, 'gt', 'query_params'); copy_if_exists(@attributes, result, 'gte', 'query_params'); copy_if_exists(@attributes, result, 'lt', 'query_params'); copy_if_exists(@attributes, result, 'lte', 'query_params'); return result end |
#request_body ⇒ Object
561 562 563 564 |
# File 'lib/webpay/data_types.rb', line 561 def request_body result = {} result end |